mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-12 18:13:47 +00:00
Fix menu option visibility
This commit is contained in:
parent
9ff7f2a8e0
commit
208eda8568
@ -405,13 +405,15 @@ public class ConversationFragment extends Fragment
|
|||||||
}
|
}
|
||||||
menu.findItem(R.id.menu_context_copy).setVisible(!actionMessage && hasText);
|
menu.findItem(R.id.menu_context_copy).setVisible(!actionMessage && hasText);
|
||||||
|
|
||||||
boolean isLokiPublicChat = recipient.isGroupRecipient(); // TODO: Figure out a better way of determining this
|
boolean isGroupChat = recipient.isGroupRecipient(); // TODO: Figure out a better way of determining this
|
||||||
|
|
||||||
if (isLokiPublicChat) {
|
if (isGroupChat) {
|
||||||
menu.findItem(R.id.menu_context_reply).setVisible(false);
|
menu.findItem(R.id.menu_context_reply).setVisible(false);
|
||||||
|
boolean isDeleteOptionVisible = recipient.getName().equals("Loki Public Chat") && messageRecords.size() == 1;
|
||||||
|
menu.findItem(R.id.menu_context_delete_message).setVisible(isDeleteOptionVisible);
|
||||||
|
} else {
|
||||||
|
menu.findItem(R.id.menu_context_delete_message).setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
menu.findItem(R.id.menu_context_delete_message).setVisible(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ConversationAdapter getListAdapter() {
|
private ConversationAdapter getListAdapter() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user