By now, we already understand what presenters and interactors are meant to do, so let's go straight to creating code. The following is the ChatInteractor interface. This and all other Chat_ files belong to the com.example.messenger.ui.chat package:
package com.example.messenger.ui.chatimport com.example.messenger.data.vo.ConversationVOinterface ChatInteractor { interface OnMessageSendFinishedListener { fun onSendSuccess() fun onSendError() } interface onMessageLoadFinishedListener { fun onLoadSuccess(conversationVO: ConversationVO) fun onLoadError() } fun sendMessage(recipientId: Long, message: String, listener: OnMessageSendFinishedListener) fun loadMessages(conversationId: Long, listener: ...