perf: NavigationBar contentPadding
Some checks are pending
Build-Apk / build (push) Waiting to run

This commit is contained in:
二刺螈 2024-11-15 23:28:09 +08:00
parent dff1c5a15b
commit c7fb7f0e79
4 changed files with 9 additions and 9 deletions

View File

@ -67,7 +67,6 @@ import li.songe.gkd.ui.component.QueryPkgAuthCard
import li.songe.gkd.ui.style.EmptyHeight import li.songe.gkd.ui.style.EmptyHeight
import li.songe.gkd.ui.style.appItemPadding import li.songe.gkd.ui.style.appItemPadding
import li.songe.gkd.ui.style.menuPadding import li.songe.gkd.ui.style.menuPadding
import li.songe.gkd.ui.style.scaffoldPadding
import li.songe.gkd.util.LocalNavController import li.songe.gkd.util.LocalNavController
import li.songe.gkd.util.SortTypeOption import li.songe.gkd.util.SortTypeOption
import li.songe.gkd.util.mapHashCode import li.songe.gkd.util.mapHashCode
@ -262,7 +261,7 @@ fun useAppListPage(): ScaffoldExt {
} }
) { contentPadding -> ) { contentPadding ->
LazyColumn( LazyColumn(
modifier = Modifier.scaffoldPadding(contentPadding), modifier = Modifier.padding(contentPadding),
state = listState state = listState
) { ) {
items(orderedAppInfos, { it.id }) { appInfo -> items(orderedAppInfos, { it.id }) { appInfo ->

View File

@ -87,7 +87,7 @@ fun useControlPage(): ScaffoldExt {
} }
}) })
} }
) { padding -> ) { contentPadding ->
val latestRecordDesc by vm.latestRecordDescFlow.collectAsState() val latestRecordDesc by vm.latestRecordDescFlow.collectAsState()
val subsStatus by vm.subsStatusFlow.collectAsState() val subsStatus by vm.subsStatusFlow.collectAsState()
val store by storeFlow.collectAsState() val store by storeFlow.collectAsState()
@ -103,7 +103,7 @@ fun useControlPage(): ScaffoldExt {
Column( Column(
modifier = Modifier modifier = Modifier
.verticalScroll(scrollState) .verticalScroll(scrollState)
.padding(padding) .padding(contentPadding)
) { ) {
if (writeSecureSettings) { if (writeSecureSettings) {
TextSwitch( TextSwitch(

View File

@ -191,11 +191,11 @@ fun useSettingsPage(): ScaffoldExt {
) )
}) })
}, },
) { padding -> ) { contentPadding ->
Column( Column(
modifier = Modifier modifier = Modifier
.verticalScroll(scrollState) .verticalScroll(scrollState)
.padding(padding) .padding(contentPadding)
) { ) {
Text( Text(

View File

@ -68,6 +68,7 @@ import li.songe.gkd.db.DbSet
import li.songe.gkd.ui.component.SubsItemCard import li.songe.gkd.ui.component.SubsItemCard
import li.songe.gkd.ui.component.TextMenu import li.songe.gkd.ui.component.TextMenu
import li.songe.gkd.ui.component.waitResult import li.songe.gkd.ui.component.waitResult
import li.songe.gkd.ui.style.EmptyHeight
import li.songe.gkd.ui.style.itemVerticalPadding import li.songe.gkd.ui.style.itemVerticalPadding
import li.songe.gkd.util.LOCAL_SUBS_ID import li.songe.gkd.util.LOCAL_SUBS_ID
import li.songe.gkd.util.SafeR import li.songe.gkd.util.SafeR
@ -342,7 +343,7 @@ fun useSubsManagePage(): ScaffoldExt {
} }
} }
}, },
) { padding -> ) { contentPadding ->
val lazyListState = rememberLazyListState() val lazyListState = rememberLazyListState()
val reorderableLazyColumnState = val reorderableLazyColumnState =
rememberReorderableLazyListState(lazyListState) { from, to -> rememberReorderableLazyListState(lazyListState) { from, to ->
@ -358,7 +359,7 @@ fun useSubsManagePage(): ScaffoldExt {
} }
Box( Box(
modifier = Modifier modifier = Modifier
.padding(padding) .padding(contentPadding)
.fillMaxSize() .fillMaxSize()
.pullRefresh(pullRefreshState, subItems.isNotEmpty()) .pullRefresh(pullRefreshState, subItems.isNotEmpty())
) { ) {
@ -430,7 +431,7 @@ fun useSubsManagePage(): ScaffoldExt {
} }
} }
item { item {
Spacer(modifier = Modifier.height(80.dp)) Spacer(modifier = Modifier.height(EmptyHeight))
} }
} }
PullRefreshIndicator( PullRefreshIndicator(