Update Compose snapshot
This commit is contained in:
1 parent
2b30aca47c
commit
7dce4cfa8e
7 files changed
+15
-11
No files matched your search
@@ -489,7 +489,7 @@ fun DownloadsScreen(navigator: DestinationsNavigator) = composing(navigator) {
|
||||
onClick = ::onItemClick.partially1(info),
|
||||
onLongClick = { navigator.navigate(info.galleryInfo.asDst()) },
|
||||
info = info,
|
||||
modifier = Modifier.thenIf(animateItems) { animateItemPlacement() },
|
||||
modifier = Modifier.thenIf(animateItems) { animateItem() },
|
||||
badgeText = info.pages.takeIf { it > 0 }?.toString(),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ fun FavouritesScreen(navigator: DestinationsNavigator) = composing(navigator) {
|
||||
val checked = info.gid in checkedInfoMap
|
||||
CheckableItem(
|
||||
checked = checked,
|
||||
modifier = Modifier.thenIf(animateItems) { animateItemPlacement() },
|
||||
modifier = Modifier.thenIf(animateItems) { animateItem() },
|
||||
) { interactionSource ->
|
||||
GalleryInfoListItem(
|
||||
onClick = {
|
||||
@@ -299,7 +299,7 @@ fun FavouritesScreen(navigator: DestinationsNavigator) = composing(navigator) {
|
||||
val checked = info.gid in checkedInfoMap
|
||||
CheckableItem(
|
||||
checked = checked,
|
||||
modifier = Modifier.thenIf(animateItems) { animateItemPlacement() },
|
||||
modifier = Modifier.thenIf(animateItems) { animateItem() },
|
||||
) { interactionSource ->
|
||||
GalleryInfoGridItem(
|
||||
onClick = {
|
||||
|
||||
@@ -64,8 +64,9 @@ import androidx.compose.ui.platform.LocalFocusManager
|
||||
import androidx.compose.ui.platform.LocalTextToolbar
|
||||
import androidx.compose.ui.res.dimensionResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.AnnotatedString
|
||||
import androidx.compose.ui.text.fromHtml
|
||||
import androidx.compose.ui.text.input.TextFieldValue
|
||||
import androidx.compose.ui.text.parseAsHtml
|
||||
import androidx.compose.ui.unit.Constraints
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.max
|
||||
@@ -337,7 +338,7 @@ fun GalleryCommentsScreen(gid: Long, navigator: DestinationsNavigator) = composi
|
||||
}
|
||||
if (comment.editable) {
|
||||
onSelect(editComment) {
|
||||
userComment = TextFieldValue(comment.comment.parseAsHtml())
|
||||
userComment = TextFieldValue(AnnotatedString.fromHtml(comment.comment))
|
||||
commentId = comment.id
|
||||
commenting = true
|
||||
}
|
||||
|
||||
@@ -26,7 +26,8 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.parseAsHtml
|
||||
import androidx.compose.ui.text.AnnotatedString
|
||||
import androidx.compose.ui.text.fromHtml
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.hippo.ehviewer.BuildConfig
|
||||
import com.hippo.ehviewer.R
|
||||
@@ -58,7 +59,7 @@ private fun versionCode() = "${BuildConfig.VERSION_NAME} (${BuildConfig.COMMIT_S
|
||||
|
||||
@Composable
|
||||
@Stable
|
||||
private fun author() = stringResource(R.string.settings_about_author_summary).replace('$', '@').parseAsHtml()
|
||||
private fun author() = AnnotatedString.fromHtml(stringResource(R.string.settings_about_author_summary).replace('$', '@'))
|
||||
|
||||
@Destination<RootGraph>
|
||||
@Composable
|
||||
|
||||
@@ -37,7 +37,8 @@ import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.dimensionResource
|
||||
import androidx.compose.ui.res.stringArrayResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.parseAsHtml
|
||||
import androidx.compose.ui.text.AnnotatedString
|
||||
import androidx.compose.ui.text.fromHtml
|
||||
import com.hippo.ehviewer.R
|
||||
import com.hippo.ehviewer.Settings
|
||||
import com.hippo.ehviewer.asMutableState
|
||||
@@ -116,7 +117,7 @@ fun EhScreen(navigator: DestinationsNavigator) {
|
||||
Column {
|
||||
val warning = stringResource(id = R.string.settings_eh_identity_cookies_signed)
|
||||
val str = cookies.joinToString("\n") { (k, v) -> "$k: $v" }
|
||||
Text(text = warning.parseAsHtml())
|
||||
Text(text = AnnotatedString.fromHtml(warning))
|
||||
Spacer(modifier = Modifier.size(dimensionResource(id = R.dimen.keyline_margin)))
|
||||
OutlinedTextField(
|
||||
value = str,
|
||||
|
||||
@@ -28,6 +28,7 @@ import androidx.compose.material3.FloatingActionButton
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.MenuAnchorType
|
||||
import androidx.compose.material3.OutlinedTextField
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.material3.Text
|
||||
@@ -126,7 +127,7 @@ fun FilterScreen(navigator: DestinationsNavigator) {
|
||||
onExpandedChange = { expanded = !expanded },
|
||||
) {
|
||||
OutlinedTextField(
|
||||
modifier = Modifier.menuAnchor(),
|
||||
modifier = Modifier.menuAnchor(MenuAnchorType.PrimaryNotEditable),
|
||||
readOnly = true,
|
||||
value = type,
|
||||
onValueChange = {},
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ dependencyResolutionManagement {
|
||||
maven("https://jitpack.io")
|
||||
maven("https://androidx.dev/storage/compose-compiler/repository/")
|
||||
// TODO: Remove on Compose 1.7.0-alpha07 release
|
||||
maven("https://androidx.dev/snapshots/builds/11644901/artifacts/repository")
|
||||
maven("https://androidx.dev/snapshots/builds/11689537/artifacts/repository")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user