use of com.waz.zclient.controllers.tracking.events.group.AddedMemberToGroupEvent in project wire-android by wireapp.
the class ConversationManagerFragment method onSelectedUsers.
@Override
public void onSelectedUsers(List<User> users, ConversationChangeRequester requester) {
// TODO https://wearezeta.atlassian.net/browse/AN-3730
getControllerFactory().getPickUserController().hidePickUser(getCurrentPickerDestination(), false);
IConversation currentConversation = getStoreFactory().getConversationStore().getCurrentConversation();
if (currentConversation.getType() == IConversation.Type.ONE_TO_ONE) {
getStoreFactory().getConversationStore().createGroupConversation(users, requester);
if (!getStoreFactory().getNetworkStore().hasInternetConnection()) {
ViewUtils.showAlertDialog(getActivity(), R.string.conversation__create_group_conversation__no_network__title, R.string.conversation__create_group_conversation__no_network__message, R.string.conversation__create_group_conversation__no_network__button, null, true);
}
((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new CreatedGroupConversationEvent(true, (users.size() + 1)));
} else if (currentConversation.getType() == IConversation.Type.GROUP) {
currentConversation.addMembers(users);
if (!getStoreFactory().getNetworkStore().hasInternetConnection()) {
ViewUtils.showAlertDialog(getActivity(), R.string.conversation__add_user__no_network__title, R.string.conversation__add_user__no_network__message, R.string.conversation__add_user__no_network__button, null, true);
}
((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new AddedMemberToGroupEvent(getParticipantsCount(), users.size()));
}
}
use of com.waz.zclient.controllers.tracking.events.group.AddedMemberToGroupEvent in project wire-android by wireapp.
the class ParticipantsDialogFragment method onSelectedUsers.
@Override
public void onSelectedUsers(List<User> users, ConversationChangeRequester requester) {
// TODO https://wearezeta.atlassian.net/browse/AN-3730
getControllerFactory().getPickUserController().hidePickUser(getCurrentPickerDestination(), false);
IConversation currentConversation = getStoreFactory().getConversationStore().getCurrentConversation();
if (currentConversation.getType() == IConversation.Type.ONE_TO_ONE) {
getStoreFactory().getConversationStore().createGroupConversation(users, requester);
if (!getStoreFactory().getNetworkStore().hasInternetConnection()) {
ViewUtils.showAlertDialog(getActivity(), R.string.conversation__create_group_conversation__no_network__title, R.string.conversation__create_group_conversation__no_network__message, R.string.conversation__create_group_conversation__no_network__button, null, true);
}
((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new CreatedGroupConversationEvent(true, (users.size() + 1)));
} else if (currentConversation.getType() == IConversation.Type.GROUP) {
currentConversation.addMembers(users);
if (!getStoreFactory().getNetworkStore().hasInternetConnection()) {
ViewUtils.showAlertDialog(getActivity(), R.string.conversation__add_user__no_network__title, R.string.conversation__add_user__no_network__message, R.string.conversation__add_user__no_network__button, null, true);
}
((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new AddedMemberToGroupEvent(getParticipantsCount(), users.size()));
}
hide();
}
use of com.waz.zclient.controllers.tracking.events.group.AddedMemberToGroupEvent in project wire-android by wireapp.
the class ParticipantFragment method onSelectedUsers.
//////////////////////////////////////////////////////////////////////////////////////////
//
// PickUserFragment.Container
//
//////////////////////////////////////////////////////////////////////////////////////////
@Override
public void onSelectedUsers(List<User> users, ConversationChangeRequester requester) {
IConversation currentConversation = getStoreFactory().getConversationStore().getCurrentConversation();
if (currentConversation.getType() == IConversation.Type.ONE_TO_ONE) {
getControllerFactory().getPickUserController().hidePickUser(getCurrentPickerDestination(), false);
dismissDialog();
getStoreFactory().getConversationStore().createGroupConversation(users, requester);
if (!getStoreFactory().getNetworkStore().hasInternetConnection()) {
ViewUtils.showAlertDialog(getActivity(), R.string.conversation__create_group_conversation__no_network__title, R.string.conversation__create_group_conversation__no_network__message, R.string.conversation__create_group_conversation__no_network__button, null, true);
}
((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new CreatedGroupConversationEvent(true, (users.size() + 1)));
} else if (currentConversation.getType() == IConversation.Type.GROUP) {
currentConversation.addMembers(users);
getControllerFactory().getPickUserController().hidePickUser(getCurrentPickerDestination(), false);
if (!getStoreFactory().getNetworkStore().hasInternetConnection()) {
ViewUtils.showAlertDialog(getActivity(), R.string.conversation__add_user__no_network__title, R.string.conversation__add_user__no_network__message, R.string.conversation__add_user__no_network__button, null, true);
}
((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new AddedMemberToGroupEvent(getParticipantsCount(), users.size()));
}
}
Aggregations