pref: 优化 UI
This commit is contained in:
parent
b487b1686c
commit
53df4568f3
|
|
@ -254,7 +254,7 @@ fun ForumThreadListPage(
|
|||
Column(
|
||||
modifier = Modifier.fillMaxWidth(fraction)
|
||||
) {
|
||||
if (index > 0 && threadList[index - 1].isTop != item.isTop) {
|
||||
if (index > 0) {
|
||||
Divider(
|
||||
color = ExtendedTheme.colors.divider,
|
||||
modifier = Modifier.padding(horizontal = 16.dp),
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.huanchengfly.tieba.post.ui.page.main.notifications.list
|
|||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
|
|
@ -89,8 +88,7 @@ fun NotificationsListPage(
|
|||
onLoadMore = { viewModel.send(NotificationsListUiIntent.LoadMore(currentPage + 1)) },
|
||||
) {
|
||||
LazyColumn(
|
||||
contentPadding = PaddingValues(vertical = 16.dp),
|
||||
verticalArrangement = Arrangement.spacedBy(24.dp),
|
||||
contentPadding = PaddingValues(vertical = 4.dp)
|
||||
) {
|
||||
items(
|
||||
items = data,
|
||||
|
|
@ -109,7 +107,7 @@ fun NotificationsListPage(
|
|||
ThreadActivity.launch(context, it.threadId!!, it.postId)
|
||||
}
|
||||
}
|
||||
.padding(horizontal = 16.dp)
|
||||
.padding(horizontal = 16.dp, vertical = 12.dp)
|
||||
) {
|
||||
if (it.replyer != null) {
|
||||
UserHeader(
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import androidx.compose.foundation.shape.RoundedCornerShape
|
|||
import androidx.compose.material.*
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.geometry.Offset
|
||||
|
|
@ -36,9 +35,7 @@ fun LoadMoreLayout(
|
|||
) {
|
||||
val loadDistance = with(LocalDensity.current) { LoadDistance.toPx() }
|
||||
|
||||
val canLoadMore = remember(key1 = enableLoadMore, key2 = loadEnd) {
|
||||
enableLoadMore || !loadEnd
|
||||
}
|
||||
val canLoadMore = (enableLoadMore && !loadEnd)
|
||||
|
||||
val swipeableState = if (canLoadMore) {
|
||||
rememberSwipeableState(isLoading) { newValue ->
|
||||
|
|
|
|||
Loading…
Reference in New Issue