refactor: limit Navigator log to Preview/Debug only

This commit is contained in:
Cuong-Tran 2024-07-08 11:35:25 +07:00
parent ff66c1c04e
commit 16401ea86f
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2

View file

@ -16,6 +16,7 @@ import cafe.adriel.voyager.core.screen.uniqueScreenKey
import cafe.adriel.voyager.core.stack.StackEvent
import cafe.adriel.voyager.navigator.Navigator
import cafe.adriel.voyager.transitions.ScreenTransitionContent
import eu.kanade.tachiyomi.util.system.isReleaseBuildType
import kotlinx.coroutines.CoroutineName
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
@ -91,7 +92,9 @@ fun ScreenTransition(
modifier = modifier,
label = "screen-transition",
) { screen ->
logcat(LogPriority.ERROR) { "ScreenTransition: ${screen.key}" }
if (!isReleaseBuildType) {
logcat(LogPriority.ERROR) { "ScreenTransition: ${screen.key}" }
}
navigator.saveableState("screen-transition", screen) {
content(screen)
}