Restore previous logic to select the next message after deleting the current one
@@ -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) {
