mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 03:12:15 +00:00
Fix: Nested scrolling of AppSheet (closes #246)
This commit is contained in:
parent
c990114b57
commit
f5fd8c30df
@ -33,8 +33,11 @@ import androidx.compose.runtime.livedata.observeAsState
|
|||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.runtime.rememberCoroutineScope
|
import androidx.compose.runtime.rememberCoroutineScope
|
||||||
|
import androidx.compose.ui.ExperimentalComposeUiApi
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||||
import androidx.compose.ui.platform.ComposeView
|
import androidx.compose.ui.platform.ComposeView
|
||||||
|
import androidx.compose.ui.platform.rememberNestedScrollInteropConnection
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.core.net.toUri
|
import androidx.core.net.toUri
|
||||||
@ -347,7 +350,7 @@ class AppSheetX() : FullscreenBottomSheetDialogFragment(), Callbacks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class, ExperimentalComposeUiApi::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun AppSheet() {
|
fun AppSheet() {
|
||||||
val includeIncompatible = Preferences[Preferences.Key.IncompatibleVersions]
|
val includeIncompatible = Preferences[Preferences.Key.IncompatibleVersions]
|
||||||
@ -400,6 +403,7 @@ class AppSheetX() : FullscreenBottomSheetDialogFragment(), Callbacks {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
val snackbarHostState = remember { SnackbarHostState() }
|
val snackbarHostState = remember { SnackbarHostState() }
|
||||||
|
val nestedScrollConnection = rememberNestedScrollInteropConnection()
|
||||||
val coroutineScope = rememberCoroutineScope()
|
val coroutineScope = rememberCoroutineScope()
|
||||||
|
|
||||||
suggestedProductRepo?.let { (product, repo) ->
|
suggestedProductRepo?.let { (product, repo) ->
|
||||||
@ -417,7 +421,8 @@ class AppSheetX() : FullscreenBottomSheetDialogFragment(), Callbacks {
|
|||||||
) { paddingValues ->
|
) { paddingValues ->
|
||||||
LazyColumn(
|
LazyColumn(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(paddingValues),
|
.padding(paddingValues)
|
||||||
|
.nestedScroll(nestedScrollConnection),
|
||||||
verticalArrangement = Arrangement.spacedBy(8.dp),
|
verticalArrangement = Arrangement.spacedBy(8.dp),
|
||||||
contentPadding = PaddingValues(8.dp)
|
contentPadding = PaddingValues(8.dp)
|
||||||
) {
|
) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user