@Override public void setCurrentConversation( IConversation conversation, ConversationChangeRequester conversationChangerSender) { if (conversation instanceof InboxLinkConversation) { conversation = inboxList.get(0); } if (conversation != null) { conversation.setArchived(false); } if (conversation != null) { Timber.i( "Set current conversation to %s, requester %s", conversation.getName(), conversationChangerSender); } else { Timber.i("Set current conversation to null, requester %s", conversationChangerSender); } this.conversationChangeRequester = conversationChangerSender; IConversation oldConversation = conversationChangerSender == ConversationChangeRequester.FIRST_LOAD ? null : selectedConversation; conversationsList.setSelectedConversation(conversation); if (oldConversation == null || (oldConversation != null && conversation != null && oldConversation.getId().equals(conversation.getId()))) { // Notify explicitly if the conversation doesn't change, the UiSginal notifies only when the // conversation changes notifyCurrentConversationHasChanged(oldConversation, conversation, conversationChangerSender); } }
@Override public void sendMessage( IConversation conversation, AudioAssetForUpload audioAssetForUpload, MessageContent.Asset.ErrorHandler errorHandler) { if (conversation != null) { Timber.i("Send audio file to %s", conversation.getName()); conversation.sendMessage(new MessageContent.Asset(audioAssetForUpload, errorHandler)); } }