mirror of
https://github.com/ChronosX88/Influence.git
synced 2024-11-08 19:50:59 +00:00
Now loading messages from archive when ChatActivity is visible again and when load messages added set of last message
This commit is contained in:
parent
2f454ec05f
commit
18bce5605f
@ -179,6 +179,7 @@ class ChatPresenter(private val view: CoreContracts.IChatViewContract, private v
|
||||
chatEntity.firstMessageUid = query.mamResultExtensions[0].id
|
||||
LocalDBWrapper.updateChatEntity(chatEntity)
|
||||
}
|
||||
EventBus.getDefault().post(LastMessageEvent(chatID, GenericMessage(LocalDBWrapper.getLastMessage(chatID))))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,6 @@ class ChatActivity : AppCompatActivity(), CoreContracts.IChatViewContract {
|
||||
presenter = ChatPresenter(this, intent.getStringExtra("chatID"))
|
||||
loadAvatarFromIntent(intent)
|
||||
presenter!!.loadLocalMessages()
|
||||
presenter!!.loadRecentPageMessages()
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
@ -119,5 +118,8 @@ class ChatActivity : AppCompatActivity(), CoreContracts.IChatViewContract {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
presenter!!.loadRecentPageMessages()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user