comboctl-main: Always move past skipped screens in navigateToRTScreen()

Without this, navigation gets stuck if an unrecognized screen
is encountered.

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
This commit is contained in:
Carlos Rafael Giani 2023-01-01 14:22:30 +01:00
parent 9af5499d70
commit 7f6f63bcf4

View file

@ -1004,7 +1004,9 @@ suspend fun navigateToRTScreen(
// when remaining TBR duration is shown on the main screen and the
// duration happens to change during this loop. If this occurs,
// skip the redundant screen.
if ((previousScreenType != null) && (previousScreenType == parsedScreen::class)) {
if ((parsedScreen::class != ParsedScreen.UnrecognizedScreen::class) &&
(previousScreenType != null) &&
(previousScreenType == parsedScreen::class)) {
logger(LogLevel.DEBUG) { "Got a screen of the same type ${parsedScreen::class}; skipping" }
continue
}