mirror of
https://github.com/Dark98/SliceBeam.git
synced 2026-07-03 00:38:53 +00:00
Notify subs view in changelog
This commit is contained in:
@@ -45,6 +45,7 @@ import ru.ytkab0bp.slicebeam.view.BeamButton;
|
|||||||
import ru.ytkab0bp.slicebeam.view.BoostySubsView;
|
import ru.ytkab0bp.slicebeam.view.BoostySubsView;
|
||||||
|
|
||||||
public class ChangeLogBottomSheet extends BottomSheetDialog {
|
public class ChangeLogBottomSheet extends BottomSheetDialog {
|
||||||
|
private BoostySubsView subsView;
|
||||||
private ScrollView scrollView;
|
private ScrollView scrollView;
|
||||||
private ViewPager pager;
|
private ViewPager pager;
|
||||||
|
|
||||||
@@ -154,7 +155,7 @@ public class ChangeLogBottomSheet extends BottomSheetDialog {
|
|||||||
subtitle.setPadding(ViewUtils.dp(12), 0, ViewUtils.dp(12), 0);
|
subtitle.setPadding(ViewUtils.dp(12), 0, ViewUtils.dp(12), 0);
|
||||||
ll.addView(subtitle);
|
ll.addView(subtitle);
|
||||||
|
|
||||||
BoostySubsView subsView = new BoostySubsView(context);
|
subsView = new BoostySubsView(context);
|
||||||
if (SliceBeam.SERVER_DATA != null) {
|
if (SliceBeam.SERVER_DATA != null) {
|
||||||
List<String> list = new ArrayList<>(SliceBeam.SERVER_DATA.boostySubscribers);
|
List<String> list = new ArrayList<>(SliceBeam.SERVER_DATA.boostySubscribers);
|
||||||
Collections.shuffle(list);
|
Collections.shuffle(list);
|
||||||
@@ -238,6 +239,11 @@ public class ChangeLogBottomSheet extends BottomSheetDialog {
|
|||||||
|
|
||||||
@EventHandler(runOnMainThread = true)
|
@EventHandler(runOnMainThread = true)
|
||||||
public void onDataUpdated(BeamServerDataUpdatedEvent e) {
|
public void onDataUpdated(BeamServerDataUpdatedEvent e) {
|
||||||
|
if (SliceBeam.SERVER_DATA != null) {
|
||||||
|
List<String> list = new ArrayList<>(SliceBeam.SERVER_DATA.boostySubscribers);
|
||||||
|
Collections.shuffle(list);
|
||||||
|
subsView.setStrings(list);
|
||||||
|
}
|
||||||
pager.getAdapter().notifyDataSetChanged();
|
pager.getAdapter().notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user