summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/section/HubOnboardingSection.kt20
1 files changed, 18 insertions, 2 deletions
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/section/HubOnboardingSection.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/section/HubOnboardingSection.kt
index 6943e9b00ed8..6989dcbaa0d5 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/section/HubOnboardingSection.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/section/HubOnboardingSection.kt
@@ -34,6 +34,7 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
+import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
@@ -52,6 +53,8 @@ import com.android.systemui.statusbar.phone.ComponentSystemUIDialog
import com.android.systemui.statusbar.phone.SystemUIDialogFactory
import com.android.systemui.statusbar.phone.createBottomSheet
import javax.inject.Inject
+import kotlin.time.Duration.Companion.milliseconds
+import kotlinx.coroutines.delay
class HubOnboardingSection
@Inject
@@ -69,10 +72,23 @@ constructor(
return
}
- HubOnboardingBottomSheet(shouldShowBottomSheet = true, dialogFactory = dialogFactory) {
- viewModel.onDismissed()
+ var show by remember { mutableStateOf(false) }
+
+ LaunchedEffect(Unit) {
+ delay(SHOW_BOTTOMSHEET_DELAY_MS)
+ show = true
+ }
+
+ if (show) {
+ HubOnboardingBottomSheet(shouldShowBottomSheet = true, dialogFactory = dialogFactory) {
+ viewModel.onDismissed()
+ }
}
}
+
+ companion object {
+ val SHOW_BOTTOMSHEET_DELAY_MS = 1000.milliseconds
+ }
}
@Composable