use of com.waz.zclient.controllers.tracking.events.conversation.UnarchivedConversationEvent in project wire-android by wireapp.
the class PendingConnectRequestManagerFragment method onOptionsItemClicked.
@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);
((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new ArchivedConversationEvent(conversation.getType().toString()));
break;
case UNARCHIVE:
getStoreFactory().getConversationStore().archive(conversation, false);
((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new UnarchivedConversationEvent(conversation.getType().toString()));
break;
case SILENCE:
conversation.setMuted(true);
break;
case UNSILENCE:
conversation.setMuted(false);
break;
}
optionsMenuControl.close();
}
use of com.waz.zclient.controllers.tracking.events.conversation.UnarchivedConversationEvent in project wire-android by wireapp.
the class ConversationListManagerFragment method onOptionsItemClicked.
@Override
public void onOptionsItemClicked(IConversation conversation, User user, OptionsMenuItem item) {
switch(item) {
case ARCHIVE:
getStoreFactory().getConversationStore().archive(conversation, true);
((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new ArchivedConversationEvent(conversation.getType().toString()));
break;
case UNARCHIVE:
getStoreFactory().getConversationStore().archive(conversation, false);
((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new UnarchivedConversationEvent(conversation.getType().toString()));
break;
case SILENCE:
conversation.setMuted(true);
break;
case UNSILENCE:
conversation.setMuted(false);
break;
case LEAVE:
leaveConversation(conversation);
break;
case DELETE:
deleteConversation(conversation);
break;
case BLOCK:
showBlockConfirmation(user);
break;
case UNBLOCK:
user.unblock();
break;
case CALL:
callConversation(conversation);
break;
case PICTURE:
sendPictureToConversation(conversation);
break;
}
closeMenu();
}
use of com.waz.zclient.controllers.tracking.events.conversation.UnarchivedConversationEvent in project wire-android by wireapp.
the class ParticipantFragment method toggleArchiveConversation.
public void toggleArchiveConversation(final IConversation conversation, final boolean archive) {
if (getStoreFactory().getConversationStore() != null) {
getControllerFactory().getNavigationController().setVisiblePage(Page.CONVERSATION_LIST, TAG);
getControllerFactory().getConversationScreenController().hideParticipants(false, true);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
if (getContainer() == null) {
return;
}
getStoreFactory().getConversationStore().archive(conversation, archive);
if (getControllerFactory() == null || getControllerFactory().isTornDown()) {
return;
}
if (archive) {
((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new ArchivedConversationEvent(conversation.getType().toString()));
} else {
((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new UnarchivedConversationEvent(conversation.getType().toString()));
}
}
}, getResources().getInteger(R.integer.framework_animation_duration_medium));
}
}
Aggregations