Skip to content

Commit

Permalink
Hide 'Add to a group' for non-registered users.
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-signal committed Jun 10, 2020
1 parent 53a2a5d commit 44fe43c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -148,6 +148,8 @@ public void onViewCreated(@NonNull View fragmentView, @Nullable Bundle savedInst
startActivityForResult(RecipientExporter.export(recipient).asAddContactIntent(), REQUEST_CODE_ADD_CONTACT);
});
}

addToGroupButton.setVisibility(recipient.isRegistered() && !recipient.isGroup() ? View.VISIBLE : View.GONE);
});

viewModel.getAdminActionStatus().observe(getViewLifecycleOwner(), adminStatus -> {
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/layout/recipient_bottom_sheet.xml
Expand Up @@ -127,7 +127,9 @@
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:text="@string/RecipientBottomSheet_add_to_a_group"
app:drawableStartCompat="?attr/recipient_make_admin_icon" />
android:visibility="gone"
app:drawableStartCompat="?attr/recipient_make_admin_icon"
tools:visibility="visible" />

<Button
android:id="@+id/rbs_view_safety_number_button"
Expand Down

0 comments on commit 44fe43c

Please sign in to comment.