@Override public void showOptionsMenu(final User user) { @IConversationScreenController.ConversationMenuRequester int menuRequester = (userRequester == IConnectStore.UserRequester.SEARCH) ? IConversationScreenController.USER_PROFILE_SEARCH : IConversationScreenController.CONVERSATION_DETAILS; optionsMenuControl.setTitle(user.getDisplayName()); optionsMenuControl.createMenu( user.getConversation(), menuRequester, getControllerFactory().getThemeController().getThemeDependentOptionsTheme()); optionsMenuControl.open(); }
@Override public void onOptionsItemClicked(IConversation conversation, User user, OptionsMenuItem item) { switch (item) { case BLOCK: showBlockUserConfirmation(user); break; case UNBLOCK: user.unblock(); break; case ARCHIVE: getStoreFactory().getConversationStore().archive(conversation, true); getControllerFactory() .getTrackingController() .tagEvent(new ArchivedConversationEvent(conversation.getType().toString())); break; case UNARCHIVE: getStoreFactory().getConversationStore().archive(conversation, false); getControllerFactory() .getTrackingController() .tagEvent(new UnarchivedConversationEvent(conversation.getType().toString())); break; case SILENCE: conversation.setMuted(true); break; case UNSILENCE: conversation.setMuted(false); break; } optionsMenuControl.close(); }