use of org.thoughtcrime.securesms.groups.GroupMigrationMembershipChange in project Signal-Android by signalapp.
the class GroupsV1MigrationInfoBottomSheetDialogFragment method onViewCreated.
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
this.pendingContainer = view.findViewById(R.id.gv1_learn_more_pending_container);
this.pendingTitle = view.findViewById(R.id.gv1_learn_more_pending_title);
this.pendingList = view.findViewById(R.id.gv1_learn_more_pending_list);
this.droppedContainer = view.findViewById(R.id.gv1_learn_more_dropped_container);
this.droppedTitle = view.findViewById(R.id.gv1_learn_more_dropped_title);
this.droppedList = view.findViewById(R.id.gv1_learn_more_dropped_list);
pendingList.initializeAdapter(getViewLifecycleOwner());
droppedList.initializeAdapter(getViewLifecycleOwner());
// noinspection ConstantConditions
GroupMigrationMembershipChange membershipChange = GroupMigrationMembershipChange.deserialize(getArguments().getString(KEY_MEMBERSHIP_CHANGE));
this.viewModel = ViewModelProviders.of(this, new GroupsV1MigrationInfoViewModel.Factory(membershipChange)).get(GroupsV1MigrationInfoViewModel.class);
viewModel.getPendingMembers().observe(getViewLifecycleOwner(), this::onPendingMembersChanged);
viewModel.getDroppedMembers().observe(getViewLifecycleOwner(), this::onDroppedMembersChanged);
view.findViewById(R.id.gv1_learn_more_ok_button).setOnClickListener(v -> dismiss());
}
Aggregations