Skip to content

Commit

Permalink
Figured out the issue. AnimatedPane is blocking...something. Not sure…
Browse files Browse the repository at this point in the history
… what but committing now because it works and will continue to look into it
  • Loading branch information
jakepurple13 committed Dec 20, 2023
1 parent e8c0648 commit 81c9842
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import androidx.compose.material.icons.automirrored.filled.PlaylistPlay
import androidx.compose.material3.Icon
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.material3.adaptive.AnimatedPane
import androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi
import androidx.compose.material3.adaptive.HingePolicy
import androidx.compose.material3.adaptive.ListDetailPaneScaffold
Expand Down Expand Up @@ -59,7 +58,7 @@ fun OtakuListScreen(
)

val details: @Composable ThreePaneScaffoldScope.() -> Unit = {
AnimatedPane(modifier = Modifier.fillMaxSize()) {
//AnimatedPane(modifier = Modifier.fillMaxSize()) {
AnimatedContent(
targetState = viewModel.customItem,
label = "",
Expand Down Expand Up @@ -95,13 +94,13 @@ fun OtakuListScreen(
NoDetailSelected()
}
}
}
//}
}

ListDetailPaneScaffold(
scaffoldState = state.scaffoldState,
listPane = {
AnimatedPane(modifier = Modifier.fillMaxSize()) {
//AnimatedPane(modifier = Modifier.fillMaxSize()) {
OtakuListView(
customItem = viewModel.customItem,
customLists = viewModel.customLists,
Expand All @@ -113,7 +112,7 @@ fun OtakuListScreen(
state.navigateTo(ListDetailPaneScaffoldRole.Extra)
}
)
}
//}
},
detailPane = { if (showListDetail) details() },
extraPane = if (!showListDetail) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.TopAppBarScrollBehavior
import androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi
import androidx.compose.material3.rememberTopAppBarState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
Expand Down Expand Up @@ -109,6 +110,7 @@ class ComposeSettingsDsl {
}
}

@OptIn(ExperimentalMaterial3AdaptiveApi::class)
@ExperimentalComposeUiApi
@ExperimentalMaterial3Api
@Composable
Expand Down Expand Up @@ -166,8 +168,10 @@ fun SettingScreen(
}

//TODO: This will be for the future when this works again
/*val navigator = rememberListDetailPaneScaffoldNavigator()
var settingChoice by remember { mutableStateOf(SettingChoice.None) }
/*val navigator = rememberListDetailPaneScaffoldNavigator(
scaffoldDirective = calculateStandardPaneScaffoldDirective(currentWindowAdaptiveInfo())
)
var settingChoice by remember { mutableStateOf(SettingChoice.General) }
BackHandler(settingChoice != SettingChoice.None) {
navigator.navigateBack()
Expand All @@ -182,7 +186,7 @@ fun SettingScreen(
ListDetailPaneScaffold(
scaffoldState = navigator.scaffoldState,
listPane = {
AnimatedPane(modifier = Modifier) {
//AnimatedPane(modifier = Modifier) {
val scrollBehavior = TopAppBarDefaults.exitUntilCollapsedScrollBehavior(rememberTopAppBarState())
OtakuScaffold(
topBar = {
Expand Down Expand Up @@ -213,17 +217,17 @@ fun SettingScreen(
globalSearchClick = globalSearchClick,
listClick = listClick,
extensionClick = extensionClick,
notificationSettingsClick = { ChangeSetting(SettingChoice.Notification) },//notificationSettingsClick,
generalClick = { ChangeSetting(SettingChoice.General) },//generalClick,
otherClick = { ChangeSetting(SettingChoice.Other) },//otherClick,
moreInfoClick = { ChangeSetting(SettingChoice.MoreInfo) }//moreInfoClick
notificationSettingsClick = { ChangeSetting(SettingChoice.Notification) },
generalClick = { ChangeSetting(SettingChoice.General) },
otherClick = { ChangeSetting(SettingChoice.Other) },
moreInfoClick = { ChangeSetting(SettingChoice.MoreInfo) }
)
}
}
}
//}
}
) {
AnimatedPane(modifier = Modifier.fillMaxSize()) {
//AnimatedPane(modifier = Modifier.fillMaxSize()) {
AnimatedContent(
targetState = settingChoice,
label = "",
Expand All @@ -242,7 +246,7 @@ fun SettingScreen(
SettingChoice.None -> {}
}
}
}
//}
}*/
}

Expand Down

0 comments on commit 81c9842

Please sign in to comment.