Skip to content

Commit

Permalink
Fixed arithmetic exception
Browse files Browse the repository at this point in the history
  • Loading branch information
diareuse committed Sep 19, 2023
1 parent 3d6c05d commit 4f0c9af
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.hilt.navigation.compose.hiltViewModel
import kotlinx.coroutines.delay
import movie.metropolis.app.model.LoginMode
import movie.style.AppImage
import kotlin.math.max

@Composable
fun LoginScreen(
Expand Down Expand Up @@ -47,7 +48,7 @@ fun LoginScreen(
}
LaunchedEffect(index) {
delay(5000)
index = (index + 1) % urls.size
index = (index + 1) % max(urls.size, 1)
}
when (viewModel.mode.collectAsState().value) {
LoginMode.Login -> LoginSignInScreen(
Expand Down

0 comments on commit 4f0c9af

Please sign in to comment.