From 71a3455b10dde192ad1463397d215419909cf9b0 Mon Sep 17 00:00:00 2001 From: HuanCheng65 <22636177+HuanCheng65@users.noreply.github.com> Date: Sun, 28 Jan 2024 18:10:37 +0800 Subject: [PATCH] =?UTF-8?q?pref(Thread):=20=E5=8F=AA=E7=9C=8B=E6=A5=BC?= =?UTF-8?q?=E4=B8=BB=E5=88=87=E6=8D=A2=E7=BB=84=E4=BB=B6=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tieba/post/ui/page/thread/ThreadPage.kt | 109 +++++++++--------- 1 file changed, 57 insertions(+), 52 deletions(-) diff --git a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/thread/ThreadPage.kt b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/thread/ThreadPage.kt index 52217374..893c2d22 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/thread/ThreadPage.kt +++ b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/thread/ThreadPage.kt @@ -44,9 +44,10 @@ import androidx.compose.material.SnackbarResult import androidx.compose.material.Surface import androidx.compose.material.Text import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.outlined.ChromeReaderMode +import androidx.compose.material.icons.automirrored.outlined.ChromeReaderMode +import androidx.compose.material.icons.automirrored.rounded.ChromeReaderMode +import androidx.compose.material.icons.automirrored.rounded.Sort import androidx.compose.material.icons.rounded.AlignVerticalTop -import androidx.compose.material.icons.rounded.ChromeReaderMode import androidx.compose.material.icons.rounded.ContentCopy import androidx.compose.material.icons.rounded.Delete import androidx.compose.material.icons.rounded.Face6 @@ -57,7 +58,6 @@ import androidx.compose.material.icons.rounded.MoreVert import androidx.compose.material.icons.rounded.Report import androidx.compose.material.icons.rounded.RocketLaunch import androidx.compose.material.icons.rounded.Share -import androidx.compose.material.icons.rounded.Sort import androidx.compose.material.icons.rounded.Star import androidx.compose.material.icons.rounded.StarBorder import androidx.compose.material.pullrefresh.PullRefreshIndicator @@ -1315,55 +1315,60 @@ fun ThreadPage( modifier = Modifier.padding(horizontal = 8.dp), ) Spacer(modifier = Modifier.weight(1f)) - Text( - text = stringResource(R.string.text_all), - modifier = Modifier - .padding(horizontal = 8.dp) - .clickable( - interactionSource = remember { MutableInteractionSource() }, - indication = null, - enabled = isSeeLz - ) { - if (isSeeLz) { - viewModel.send( - ThreadUiIntent.LoadFirstPage( - threadId = threadId, - forumId = forumId, - seeLz = false, - sortType = curSortType + Row( + verticalAlignment = Alignment.CenterVertically, + modifier = Modifier.height(IntrinsicSize.Min) + ) { + Text( + text = stringResource(R.string.text_all), + modifier = Modifier + .padding(horizontal = 8.dp) + .clickable( + interactionSource = remember { MutableInteractionSource() }, + indication = null, + enabled = isSeeLz + ) { + if (isSeeLz) { + viewModel.send( + ThreadUiIntent.LoadFirstPage( + threadId = threadId, + forumId = forumId, + seeLz = false, + sortType = curSortType + ) ) - ) - } - }, - fontSize = 13.sp, - fontWeight = if (!isSeeLz) FontWeight.SemiBold else FontWeight.Normal, - color = if (!isSeeLz) ExtendedTheme.colors.text else ExtendedTheme.colors.textSecondary, - ) - HorizontalDivider() - Text( - text = stringResource(R.string.title_see_lz), - modifier = Modifier - .padding(horizontal = 8.dp) - .clickable( - interactionSource = remember { MutableInteractionSource() }, - indication = null, - enabled = !isSeeLz - ) { - if (!isSeeLz) { - viewModel.send( - ThreadUiIntent.LoadFirstPage( - threadId = threadId, - forumId = forumId, - seeLz = true, - sortType = curSortType + } + }, + fontSize = 13.sp, + fontWeight = if (!isSeeLz) FontWeight.SemiBold else FontWeight.Normal, + color = if (!isSeeLz) ExtendedTheme.colors.text else ExtendedTheme.colors.textSecondary, + ) + HorizontalDivider() + Text( + text = stringResource(R.string.title_see_lz), + modifier = Modifier + .padding(horizontal = 8.dp) + .clickable( + interactionSource = remember { MutableInteractionSource() }, + indication = null, + enabled = !isSeeLz + ) { + if (!isSeeLz) { + viewModel.send( + ThreadUiIntent.LoadFirstPage( + threadId = threadId, + forumId = forumId, + seeLz = true, + sortType = curSortType + ) ) - ) - } - }, - fontSize = 13.sp, - fontWeight = if (isSeeLz) FontWeight.SemiBold else FontWeight.Normal, - color = if (isSeeLz) ExtendedTheme.colors.text else ExtendedTheme.colors.textSecondary, - ) + } + }, + fontSize = 13.sp, + fontWeight = if (isSeeLz) FontWeight.SemiBold else FontWeight.Normal, + color = if (isSeeLz) ExtendedTheme.colors.text else ExtendedTheme.colors.textSecondary, + ) + } } } } @@ -2062,7 +2067,7 @@ private fun ThreadMenu( onClick = onImmersiveModeClick, icon = { Icon( - imageVector = if (isImmersiveMode) Icons.Rounded.ChromeReaderMode else Icons.Outlined.ChromeReaderMode, + imageVector = if (isImmersiveMode) Icons.AutoMirrored.Rounded.ChromeReaderMode else Icons.AutoMirrored.Outlined.ChromeReaderMode, contentDescription = null ) }, @@ -2083,7 +2088,7 @@ private fun ThreadMenu( onClick = onDescClick, icon = { Icon( - imageVector = Icons.Rounded.Sort, + imageVector = Icons.AutoMirrored.Rounded.Sort, contentDescription = null ) },