name = ChannelUtils.getChannelTitleName(channel, MobiComUserPreference.getInstance(context).getUserId());
public static Channel fetchGroup(Context context, Integer groupId) { String groupName = ""; //Todo: fetch group name return fetchGroup(context, groupId, groupName); }
holder.displayName.setText(contact.getDisplayName()); if (ChannelUtils.isAdminUserId(channelUserMapper.getUserKey(), channel) && Integer.valueOf(0).equals(channelUserMapper.getRole()) || ChannelUserMapper.UserRole.ADMIN.getValue().equals(channelUserMapper.getRole())) { holder.adminTextView.setVisibility(View.VISIBLE); } else {
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.channel_menu_option, menu); if (channel == null) { return true; } ChannelUserMapper loggedInUserMapper = ChannelService.getInstance(this).getChannelUserMapperByUserId(channel.getKey(), MobiComUserPreference.getInstance(ChannelInfoActivity.this).getUserId()); if (alCustomizationSettings.isHideGroupAddMembersButton() || loggedInUserMapper != null && ChannelUserMapper.UserRole.MEMBER.getValue().equals(loggedInUserMapper.getRole()) || (!ChannelUtils.isAdminUserId(userPreference.getUserId(), channel) && loggedInUserMapper != null && Integer.valueOf(0).equals(loggedInUserMapper.getRole()))) { menu.removeItem(R.id.add_member_to_channel); } if (alCustomizationSettings.isHideGroupNameUpdateButton() || channel.isBroadcastMessage()) { menu.removeItem(R.id.edit_channel_name); } return true; }
name = ChannelUtils.getChannelTitleName(channel, MobiComUserPreference.getInstance(fragmentActivity).getUserId());
continue; if (menuItems[i].equals(getString(R.string.remove_member)) && (isHideRemove || !isUserPresent || !ChannelUtils.isAdminUserId(userPreference.getUserId(), channel) && loggedInUserMapper != null && Integer.valueOf(0).equals(loggedInUserMapper.getRole()) || loggedInUserMapper != null && ChannelUserMapper.UserRole.MEMBER.getValue().equals(loggedInUserMapper.getRole()))) { continue;
public void updateTitle() { StringBuffer stringBufferTitle = new StringBuffer(); if (contact != null) { stringBufferTitle.append(contact.getDisplayName()); } else if (channel != null) { if (Channel.GroupType.GROUPOFTWO.getValue().equals(channel.getType())) { String userId = ChannelService.getInstance(getActivity()).getGroupOfTwoReceiverUserId(channel.getKey()); if (!TextUtils.isEmpty(userId)) { Contact withUserContact = appContactService.getContactById(userId); stringBufferTitle.append(withUserContact.getDisplayName()); } } else { stringBufferTitle.append(ChannelUtils.getChannelTitleName(channel, MobiComUserPreference.getInstance(getActivity()).getUserId())); } } if (stringBufferTitle != null && getActivity() != null) { setToolbarTitle(stringBufferTitle.toString()); } }
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); } } } }
myholder.contactImage.setImageResource(R.drawable.applozic_group_icon); myholder.smReceivers.setText(ChannelUtils.getChannelTitleName(channel, MobiComUserPreference.getInstance(context).getUserId())); myholder.alphabeticTextView.setVisibility(View.GONE); myholder.contactImage.setVisibility(View.VISIBLE);
public String getNameForInviteDialog() { if (contact != null) { return contact.getDisplayName(); } else if (channel != null) { if (Channel.GroupType.GROUPOFTWO.getValue().equals(channel.getType())) { String userId = ChannelService.getInstance(getActivity()).getGroupOfTwoReceiverUserId(channel.getKey()); if (!TextUtils.isEmpty(userId)) { Contact withUserContact = appContactService.getContactById(userId); return withUserContact.getDisplayName(); } } else { return ChannelUtils.getChannelTitleName(channel, MobiComUserPreference.getInstance(getActivity()).getUserId()); } } return ""; }
isUserPresent = ChannelService.getInstance(this).processIsUserPresentInChannel(channelKey); if (channel != null) { String title = ChannelUtils.getChannelTitleName(channel, userPreference.getUserId()); if (!TextUtils.isEmpty(channel.getAdminKey())) { contact = baseContactService.getContactById(channel.getAdminKey());
title = ChannelUtils.getChannelTitleName(channel, MobiComUserPreference.getInstance(context).getUserId()); notificationIconBitmap = appContactService.downloadGroupImage(context, channel);
/** * This method returns the receiver's name from the message object that this instance holds currently. * * @return If the message belongs to group it will return group's name and if it belongs to user, the display name of the user will be returned. */ public String getReceiver() { if (message.getGroupId() == null) { return contact.getDisplayName(); } else { if (channel != null) { if (Channel.GroupType.GROUPOFTWO.getValue().equals(channel.getType())) { Contact withUserContact = contactService.getContactById(ChannelService.getInstance(context).getGroupOfTwoReceiverUserId(channel.getKey())); if (withUserContact != null) { return withUserContact.getDisplayName(); } } else { return ChannelUtils.getChannelTitleName(channel, MobiComUserPreference.getInstance(context).getUserId()); } } } return null; }