diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt index fbb37fdfd..a78a33697 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt @@ -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) {