refactor: replace deprecated currentWindowAdaptiveInfo with V2

This commit is contained in:
2026-09-02 16:18:39 +08:00
parent 07031c7ac1
commit 33cc386015
@@ -2,7 +2,7 @@ package com.example.research.ui.navigation
import androidx.activity.compose.BackHandler import androidx.activity.compose.BackHandler
import androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi import androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi
import androidx.compose.material3.adaptive.currentWindowAdaptiveInfo import androidx.compose.material3.adaptive.currentWindowAdaptiveInfoV2
import androidx.compose.runtime.* import androidx.compose.runtime.*
import androidx.compose.runtime.saveable.* import androidx.compose.runtime.saveable.*
import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.compose.collectAsStateWithLifecycle
@@ -95,7 +95,7 @@ fun AppNavigation(
val shouldShowSettings = navState.shouldShowSettings val shouldShowSettings = navState.shouldShowSettings
val showBackButtonInSettings = navState.showBackButtonInSettings val showBackButtonInSettings = navState.showBackButtonInSettings
val isOperationActive = navState.isOperationActive val isOperationActive = navState.isOperationActive
val isWideScreen = currentWindowAdaptiveInfo() val isWideScreen = currentWindowAdaptiveInfoV2()
.windowSizeClass .windowSizeClass
.isWidthAtLeastBreakpoint(WIDTH_DP_MEDIUM_LOWER_BOUND) .isWidthAtLeastBreakpoint(WIDTH_DP_MEDIUM_LOWER_BOUND)