pref(Thread): 只看楼主切换组件高度
This commit is contained in:
parent
0207f830f7
commit
71a3455b10
|
|
@ -44,9 +44,10 @@ import androidx.compose.material.SnackbarResult
|
||||||
import androidx.compose.material.Surface
|
import androidx.compose.material.Surface
|
||||||
import androidx.compose.material.Text
|
import androidx.compose.material.Text
|
||||||
import androidx.compose.material.icons.Icons
|
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.AlignVerticalTop
|
||||||
import androidx.compose.material.icons.rounded.ChromeReaderMode
|
|
||||||
import androidx.compose.material.icons.rounded.ContentCopy
|
import androidx.compose.material.icons.rounded.ContentCopy
|
||||||
import androidx.compose.material.icons.rounded.Delete
|
import androidx.compose.material.icons.rounded.Delete
|
||||||
import androidx.compose.material.icons.rounded.Face6
|
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.Report
|
||||||
import androidx.compose.material.icons.rounded.RocketLaunch
|
import androidx.compose.material.icons.rounded.RocketLaunch
|
||||||
import androidx.compose.material.icons.rounded.Share
|
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.Star
|
||||||
import androidx.compose.material.icons.rounded.StarBorder
|
import androidx.compose.material.icons.rounded.StarBorder
|
||||||
import androidx.compose.material.pullrefresh.PullRefreshIndicator
|
import androidx.compose.material.pullrefresh.PullRefreshIndicator
|
||||||
|
|
@ -1315,55 +1315,60 @@ fun ThreadPage(
|
||||||
modifier = Modifier.padding(horizontal = 8.dp),
|
modifier = Modifier.padding(horizontal = 8.dp),
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
Text(
|
Row(
|
||||||
text = stringResource(R.string.text_all),
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
modifier = Modifier
|
modifier = Modifier.height(IntrinsicSize.Min)
|
||||||
.padding(horizontal = 8.dp)
|
) {
|
||||||
.clickable(
|
Text(
|
||||||
interactionSource = remember { MutableInteractionSource() },
|
text = stringResource(R.string.text_all),
|
||||||
indication = null,
|
modifier = Modifier
|
||||||
enabled = isSeeLz
|
.padding(horizontal = 8.dp)
|
||||||
) {
|
.clickable(
|
||||||
if (isSeeLz) {
|
interactionSource = remember { MutableInteractionSource() },
|
||||||
viewModel.send(
|
indication = null,
|
||||||
ThreadUiIntent.LoadFirstPage(
|
enabled = isSeeLz
|
||||||
threadId = threadId,
|
) {
|
||||||
forumId = forumId,
|
if (isSeeLz) {
|
||||||
seeLz = false,
|
viewModel.send(
|
||||||
sortType = curSortType
|
ThreadUiIntent.LoadFirstPage(
|
||||||
|
threadId = threadId,
|
||||||
|
forumId = forumId,
|
||||||
|
seeLz = false,
|
||||||
|
sortType = curSortType
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
}
|
||||||
}
|
},
|
||||||
},
|
fontSize = 13.sp,
|
||||||
fontSize = 13.sp,
|
fontWeight = if (!isSeeLz) FontWeight.SemiBold else FontWeight.Normal,
|
||||||
fontWeight = if (!isSeeLz) FontWeight.SemiBold else FontWeight.Normal,
|
color = if (!isSeeLz) ExtendedTheme.colors.text else ExtendedTheme.colors.textSecondary,
|
||||||
color = if (!isSeeLz) ExtendedTheme.colors.text else ExtendedTheme.colors.textSecondary,
|
)
|
||||||
)
|
HorizontalDivider()
|
||||||
HorizontalDivider()
|
Text(
|
||||||
Text(
|
text = stringResource(R.string.title_see_lz),
|
||||||
text = stringResource(R.string.title_see_lz),
|
modifier = Modifier
|
||||||
modifier = Modifier
|
.padding(horizontal = 8.dp)
|
||||||
.padding(horizontal = 8.dp)
|
.clickable(
|
||||||
.clickable(
|
interactionSource = remember { MutableInteractionSource() },
|
||||||
interactionSource = remember { MutableInteractionSource() },
|
indication = null,
|
||||||
indication = null,
|
enabled = !isSeeLz
|
||||||
enabled = !isSeeLz
|
) {
|
||||||
) {
|
if (!isSeeLz) {
|
||||||
if (!isSeeLz) {
|
viewModel.send(
|
||||||
viewModel.send(
|
ThreadUiIntent.LoadFirstPage(
|
||||||
ThreadUiIntent.LoadFirstPage(
|
threadId = threadId,
|
||||||
threadId = threadId,
|
forumId = forumId,
|
||||||
forumId = forumId,
|
seeLz = true,
|
||||||
seeLz = true,
|
sortType = curSortType
|
||||||
sortType = curSortType
|
)
|
||||||
)
|
)
|
||||||
)
|
}
|
||||||
}
|
},
|
||||||
},
|
fontSize = 13.sp,
|
||||||
fontSize = 13.sp,
|
fontWeight = if (isSeeLz) FontWeight.SemiBold else FontWeight.Normal,
|
||||||
fontWeight = if (isSeeLz) FontWeight.SemiBold else FontWeight.Normal,
|
color = if (isSeeLz) ExtendedTheme.colors.text else ExtendedTheme.colors.textSecondary,
|
||||||
color = if (isSeeLz) ExtendedTheme.colors.text else ExtendedTheme.colors.textSecondary,
|
)
|
||||||
)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2062,7 +2067,7 @@ private fun ThreadMenu(
|
||||||
onClick = onImmersiveModeClick,
|
onClick = onImmersiveModeClick,
|
||||||
icon = {
|
icon = {
|
||||||
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
|
contentDescription = null
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
@ -2083,7 +2088,7 @@ private fun ThreadMenu(
|
||||||
onClick = onDescClick,
|
onClick = onDescClick,
|
||||||
icon = {
|
icon = {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Rounded.Sort,
|
imageVector = Icons.AutoMirrored.Rounded.Sort,
|
||||||
contentDescription = null
|
contentDescription = null
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue