|
|
|
@ -20,11 +20,11 @@ import androidx.activity.compose.BackHandler
|
|
|
|
|
import androidx.compose.foundation.layout.Box
|
|
|
|
|
import androidx.compose.material3.Text
|
|
|
|
|
import androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi
|
|
|
|
|
import androidx.compose.material3.adaptive.ListDetailPaneScaffold
|
|
|
|
|
import androidx.compose.material3.adaptive.ListDetailPaneScaffoldRole
|
|
|
|
|
import androidx.compose.material3.adaptive.PaneAdaptedValue
|
|
|
|
|
import androidx.compose.material3.adaptive.ThreePaneScaffoldNavigator
|
|
|
|
|
import androidx.compose.material3.adaptive.rememberListDetailPaneScaffoldNavigator
|
|
|
|
|
import androidx.compose.material3.adaptive.layout.ListDetailPaneScaffold
|
|
|
|
|
import androidx.compose.material3.adaptive.layout.ListDetailPaneScaffoldRole
|
|
|
|
|
import androidx.compose.material3.adaptive.layout.PaneAdaptedValue
|
|
|
|
|
import androidx.compose.material3.adaptive.navigation.ThreePaneScaffoldNavigator
|
|
|
|
|
import androidx.compose.material3.adaptive.navigation.rememberListDetailPaneScaffoldNavigator
|
|
|
|
|
import androidx.compose.runtime.Composable
|
|
|
|
|
import androidx.compose.runtime.LaunchedEffect
|
|
|
|
|
import androidx.compose.runtime.getValue
|
|
|
|
@ -93,7 +93,8 @@ internal fun InterestsListDetailScreen(
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ListDetailPaneScaffold(
|
|
|
|
|
scaffoldState = listDetailNavigator.scaffoldState,
|
|
|
|
|
value = listDetailNavigator.scaffoldValue,
|
|
|
|
|
directive = listDetailNavigator.scaffoldDirective,
|
|
|
|
|
listPane = {
|
|
|
|
|
InterestsRoute(
|
|
|
|
|
onTopicClick = ::onTopicClickShowDetailPane,
|
|
|
|
@ -129,8 +130,8 @@ internal fun InterestsListDetailScreen(
|
|
|
|
|
|
|
|
|
|
@OptIn(ExperimentalMaterial3AdaptiveApi::class)
|
|
|
|
|
private fun <T> ThreePaneScaffoldNavigator<T>.isListPaneVisible(): Boolean =
|
|
|
|
|
scaffoldState.scaffoldValue[ListDetailPaneScaffoldRole.List] == PaneAdaptedValue.Expanded
|
|
|
|
|
scaffoldValue[ListDetailPaneScaffoldRole.List] == PaneAdaptedValue.Expanded
|
|
|
|
|
|
|
|
|
|
@OptIn(ExperimentalMaterial3AdaptiveApi::class)
|
|
|
|
|
private fun <T> ThreePaneScaffoldNavigator<T>.isDetailPaneVisible(): Boolean =
|
|
|
|
|
scaffoldState.scaffoldValue[ListDetailPaneScaffoldRole.Detail] == PaneAdaptedValue.Expanded
|
|
|
|
|
scaffoldValue[ListDetailPaneScaffoldRole.Detail] == PaneAdaptedValue.Expanded
|
|
|
|
|