public GroupInfoUpdate(Channel channel) { this.newName = channel.getName(); this.groupId = channel.getKey(); this.clientGroupId = channel.getClientGroupId(); this.imageUrl = channel.getImageUrl(); this.localImagePath = channel.getLocalImageUri(); }
public void hideAllMetadataMessages(){ buildEmptyMetadata(); this.hideMetaDataNotification = true; this.alertMetaDataNotfication = false; }
public static Channel fetchGroup(Context context, Integer groupId) { String groupName = ""; //Todo: fetch group name return fetchGroup(context, groupId, groupName); }
public void updateChannelTitle() { if (!Channel.GroupType.GROUPOFTWO.getValue().equals(channel.getType())) { Channel newChannel = ChannelService.getInstance(getActivity()).getChannelByChannelKey(channel.getKey()); if (newChannel != null && !TextUtils.isEmpty(channel.getName()) && !channel.getName().equals(newChannel.getName())) { title = ChannelUtils.getChannelTitleName(newChannel, MobiComUserPreference.getInstance(getActivity()).getUserId()); channel = newChannel; if (getActivity() != null) { setToolbarTitle(title); } } } }
public Channel getChannel(ChannelFeed channelFeed) { Channel channel = new Channel(channelFeed.getId(), channelFeed.getName(), channelFeed .getAdminName(), channelFeed.getType(), channelFeed.getUnreadCount(), channelFeed .getImageUrl()); channel.setClientGroupId(channelFeed.getClientGroupId()); channel.setNotificationAfterTime(channelFeed.getNotificationAfterTime()); channel.setDeletedAtTime(channelFeed.getDeletedAtTime()); channel.setMetadata(channelFeed.getMetadata()); channel.setParentKey(channelFeed.getParentKey()); channel.setParentClientGroupId(channelFeed.getParentClientGroupId()); return channel; }
public static ChannelUserMapper getChannelUser(Cursor cursor) { ChannelUserMapper channelUserMapper = new ChannelUserMapper(); channelUserMapper.setUserKey(cursor.getString(cursor.getColumnIndex(MobiComDatabaseHelper.USERID))); channelUserMapper.setKey(cursor.getInt(cursor.getColumnIndex(MobiComDatabaseHelper.CHANNEL_KEY))); channelUserMapper.setUnreadCount(cursor.getShort(cursor.getColumnIndex(MobiComDatabaseHelper.UNREAD_COUNT))); channelUserMapper.setRole(cursor.getInt(cursor.getColumnIndex(MobiComDatabaseHelper.ROLE))); channelUserMapper.setParentKey(cursor.getInt(cursor.getColumnIndex(MobiComDatabaseHelper.PARENT_GROUP_KEY))); return channelUserMapper; }
public void handleSendAndRecordButtonView(boolean isSendButtonVisible) { sendButton.setVisibility(alCustomizationSettings.isRecordButton() && (contact != null || channel != null && !Channel.GroupType.OPEN.getValue().equals(channel.getType())) ? isSendButtonVisible ? View.VISIBLE : View.GONE : View.VISIBLE); recordButton.setVisibility(alCustomizationSettings.isRecordButton() && (contact != null || channel != null && !Channel.GroupType.OPEN.getValue().equals(channel.getType())) ? isSendButtonVisible ? View.GONE : View.VISIBLE : View.GONE); }
@Override protected Long doInBackground(Void... params) { if (channel != null && channelUserMapper != null) { responseForRemove = channelService.removeMemberFromChannelProcess(channel.getKey(), channelUserMapper.getUserKey()); } return null; }
public synchronized boolean isUserAlreadyPresentInChannel(String clientGroupId, String userId) { Channel channel = channelDatabaseService.getChannelByClientGroupId(clientGroupId); return channelDatabaseService.isChannelUserPresent(channel.getKey(), userId); }
public Channel getChannel(Integer channelKey) { Channel channel = channelDatabaseService.getChannelByChannelKey(channelKey); if (channel == null) { channel = new Channel(channelKey); } return channel; }
public synchronized void addConversation(Conversation conversation) { if (conversation != null) { if (conversationDatabaseService.isConversationPresent(conversation.getId())) { conversationDatabaseService.updateConversation(conversation); } else { conversationDatabaseService.addConversation(conversation); } } }
public void setReceiverSmsFormat(String userId, String format) { setSmsFormat(userId, format); }
public void setChannelMetadata(ChannelMetadata channelMetadata){ this.channelMetadata = channelMetadata; this.metadata = channelMetadata.getMetadata(); }
public int leaveMemberFromChannel(String clientGroupId, String userId) { Channel channel = getChannelByClientGroupId(clientGroupId); return leaveMemberFromChannel(channel.getKey(), userId); }
public void setAlertMetaDataNotfication(boolean alertMetaDataNotfication) { if(!alertMetaDataNotfication) { buildEmptyMetadata(); } this.alertMetaDataNotfication = alertMetaDataNotfication; }
public void setSenderSmsFormat(String userId, String format) { setSmsFormat(userId, format); }
public int removeMemberFromChannel(String clientGroupId, String userId) { Channel channel = getChannelByClientGroupId(clientGroupId); return removeMemberFromChannel(channel.getKey(), userId); }
public void updateChannel(Channel channel) { if (channelDatabaseService.getChannelByChannelKey(channel.getKey()) == null) { channelDatabaseService.addChannel(channel); } else { channelDatabaseService.updateChannel(channel); } }