Skip to content

Commit 923ff78

Browse files
committed
fix consistent update checking when update checking disabled
1 parent 11803e6 commit 923ff78

File tree

1 file changed

+5
-3
lines changed
  • feature/root/src/main/java/ru/tech/imageresizershrinker/feature/root/presentation

1 file changed

+5
-3
lines changed

feature/root/src/main/java/ru/tech/imageresizershrinker/feature/root/presentation/RootContent.kt

+5-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package ru.tech.imageresizershrinker.feature.root.presentation
1919

2020
import androidx.compose.runtime.Composable
2121
import androidx.compose.runtime.LaunchedEffect
22-
import androidx.compose.runtime.SideEffect
2322
import androidx.compose.runtime.getValue
2423
import androidx.compose.runtime.mutableIntStateOf
2524
import androidx.compose.runtime.remember
@@ -52,8 +51,11 @@ fun RootContent(
5251
randomEmojiKey++
5352
}
5453

55-
if (component.settingsState.appOpenCount >= 2) {
56-
SideEffect(effect = component::tryGetUpdate)
54+
if (component.settingsState.appOpenCount >= 2 && component.settingsState.showUpdateDialogOnStartup) {
55+
LaunchedEffect(Unit) {
56+
delay(500)
57+
component.tryGetUpdate()
58+
}
5759
}
5860

5961
ImageToolboxCompositionLocals(

0 commit comments

Comments
 (0)