Search in sources :

Example 1 with OpenedConversationEvent

use of com.waz.zclient.controllers.tracking.events.connect.OpenedConversationEvent in project wire-android by wireapp.

the class ConversationListManagerFragment method onSelectedUsers.

//////////////////////////////////////////////////////////////////////////////////////////
//
//  PickUserFragment.Container
//
//////////////////////////////////////////////////////////////////////////////////////////
@Override
public void onSelectedUsers(List<User> users, ConversationChangeRequester requester) {
    // TODO https://wearezeta.atlassian.net/browse/AN-3730
    getControllerFactory().getPickUserController().hidePickUser(getCurrentPickerDestination(), true);
    if (users.size() == 1) {
        User user = users.get(0);
        IConversation conversation = user.getConversation();
        if (conversation != null) {
            getStoreFactory().getConversationStore().setCurrentConversation(conversation, requester);
        }
        ((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new OpenedConversationEvent(ConversationType.ONE_TO_ONE_CONVERSATION.name()));
    } else {
        getStoreFactory().getConversationStore().createGroupConversation(users, requester);
        ((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new CreatedGroupConversationEvent(false, (users.size() + 1)));
        ((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new OpenedConversationEvent(ConversationType.GROUP_CONVERSATION.name()));
    }
}
Also used : CreatedGroupConversationEvent(com.waz.zclient.controllers.tracking.events.group.CreatedGroupConversationEvent) User(com.waz.api.User) GlobalTrackingController(com.waz.zclient.tracking.GlobalTrackingController) OpenedConversationEvent(com.waz.zclient.controllers.tracking.events.connect.OpenedConversationEvent) IConversation(com.waz.api.IConversation)

Example 2 with OpenedConversationEvent

use of com.waz.zclient.controllers.tracking.events.connect.OpenedConversationEvent in project wire-android by wireapp.

the class PickUserFragment method onUserDoubleClicked.

@Override
public void onUserDoubleClicked(User user, int position, View anchorView) {
    if (!(anchorView instanceof ChatheadWithTextFooter)) {
        return;
    }
    if (user == null || user.isMe() || user.getConnectionStatus() != User.ConnectionStatus.ACCEPTED || getControllerFactory().getPickUserController().hasSelectedUsers()) {
        return;
    }
    ((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new SelectedTopUser());
    ((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new OpenedConversationEvent(ConversationType.ONE_TO_ONE_CONVERSATION.name()));
    getStoreFactory().getConversationStore().setCurrentConversation(user.getConversation(), ConversationChangeRequester.START_CONVERSATION);
}
Also used : GlobalTrackingController(com.waz.zclient.tracking.GlobalTrackingController) SelectedTopUser(com.waz.zclient.controllers.tracking.events.connect.SelectedTopUser) ChatheadWithTextFooter(com.waz.zclient.pages.main.participants.views.ChatheadWithTextFooter) OpenedConversationEvent(com.waz.zclient.controllers.tracking.events.connect.OpenedConversationEvent)

Example 3 with OpenedConversationEvent

use of com.waz.zclient.controllers.tracking.events.connect.OpenedConversationEvent in project wire-android by wireapp.

the class PickUserFragment method onConversationClicked.

@Override
public void onConversationClicked(IConversation conversation) {
    KeyboardUtils.hideKeyboard(getActivity());
    getStoreFactory().getConversationStore().setCurrentConversation(conversation, ConversationChangeRequester.START_CONVERSATION);
    ((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new OpenedConversationEvent(ConversationType.GROUP_CONVERSATION.name()));
}
Also used : GlobalTrackingController(com.waz.zclient.tracking.GlobalTrackingController) OpenedConversationEvent(com.waz.zclient.controllers.tracking.events.connect.OpenedConversationEvent)

Aggregations

OpenedConversationEvent (com.waz.zclient.controllers.tracking.events.connect.OpenedConversationEvent)3 GlobalTrackingController (com.waz.zclient.tracking.GlobalTrackingController)3 IConversation (com.waz.api.IConversation)1 User (com.waz.api.User)1 SelectedTopUser (com.waz.zclient.controllers.tracking.events.connect.SelectedTopUser)1 CreatedGroupConversationEvent (com.waz.zclient.controllers.tracking.events.group.CreatedGroupConversationEvent)1 ChatheadWithTextFooter (com.waz.zclient.pages.main.participants.views.ChatheadWithTextFooter)1