Merge pull request #6318 from thundernest/restore_move_to_next_logic

Restore previous logic to select the next message after deleting the current one
This commit is contained in:
cketti 2022-09-22 15:46:08 +02:00 committed by GitHub
commit 20935c3e4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1198,10 +1198,16 @@ open class MessageList :
}
private fun showLogicalNextMessage(): Boolean {
return when (lastDirection) {
val couldMoveInLastDirection = when (lastDirection) {
Direction.NEXT -> showNextMessage()
Direction.PREVIOUS -> showPreviousMessage()
}
return if (couldMoveInLastDirection) {
true
} else {
showNextMessage() || showPreviousMessage()
}
}
override fun setProgress(enable: Boolean) {