public ConversationViewHolder(View view) { super(view); alphabeticImage = view.findViewById(R.id.alphabeticImage); profileImage = view.findViewById(R.id.contactImage); receiverName = view.findViewById(R.id.smReceivers); messageTv = view.findViewById(R.id.message); unreadCount = view.findViewById(R.id.unreadSmsCount); createdAtTime = view.findViewById(R.id.createdAtTime); attachmentIcon = view.findViewById(R.id.attachmentIcon); properties = new AlMessageProperties(context); uiService = new AlUIService(context); view.setOnClickListener(this); view.setOnCreateContextMenuListener(this); }
@Override public boolean onMenuItemClick(MenuItem item) { switch (item.getItemId()) { case 0: if (properties.getChannel() != null && properties.getChannel().isDeleted()) { uiService.deleteGroupConversation(properties.getChannel()); } else { uiService.deleteConversationThread(properties.getContact(), properties.getChannel()); } break; case 1: uiService.deleteGroupConversation(properties.getChannel()); break; case 2: uiService.channelLeaveProcess(properties.getChannel()); break; default: } return true; } };
showToastMessage(context.getString(R.string.you_dont_have_any_network_access_info)); return;
showToastMessage(context.getString(R.string.you_dont_have_any_network_access_info)); return;