diff --git a/app/shared/ui-settings/src/commonMain/kotlin/ui/settings/SettingsPage.kt b/app/shared/ui-settings/src/commonMain/kotlin/ui/settings/SettingsPage.kt index a21cda6eac..b8a177d2ef 100644 --- a/app/shared/ui-settings/src/commonMain/kotlin/ui/settings/SettingsPage.kt +++ b/app/shared/ui-settings/src/commonMain/kotlin/ui/settings/SettingsPage.kt @@ -90,6 +90,7 @@ import me.him188.ani.app.ui.settings.tabs.media.source.MediaSourceSubscriptionGr import me.him188.ani.app.ui.settings.tabs.network.DanmakuGroup import me.him188.ani.app.ui.settings.tabs.network.GlobalProxyGroup import me.him188.ani.utils.platform.hasScrollingBug +import me.him188.ani.utils.platform.isMobile /** * @see renderPreferenceTab 查看名称 @@ -227,8 +228,11 @@ internal fun SettingsPageLayout( } } - val topAppBarScrollBehavior = TopAppBarDefaults.exitUntilCollapsedScrollBehavior() - + val topAppBarScrollBehavior = if (LocalPlatform.current.isMobile()) { + TopAppBarDefaults.exitUntilCollapsedScrollBehavior() + } else { + null + } AniListDetailPaneScaffold( navigator, @@ -251,7 +255,7 @@ internal fun SettingsPageLayout( .consumeWindowInsets(windowInsets.only(WindowInsetsSides.Top)) .fillMaxWidth() .ifThen(!LocalPlatform.current.hasScrollingBug()) { - nestedScroll(topAppBarScrollBehavior.nestedScrollConnection) + topAppBarScrollBehavior?.let { nestedScroll(it.nestedScrollConnection) } } .verticalScroll(rememberScrollState()), drawerContainerColor = Color.Unspecified,