And restore pages display
This commit is contained in:
1 parent
d8e168ed61
commit
d3bb169cdc
2 files changed
+11
-1
No files matched your search
@@ -48,6 +48,7 @@ class ListGalleryHolder(
|
||||
) : GalleryHolder(composeView) {
|
||||
|
||||
private val height = (Settings.listThumbSize * 3).pxToDp.dp
|
||||
private val showPages = Settings.showGalleryPages
|
||||
|
||||
override fun bind(galleryInfo: GalleryInfo, onClick: () -> Unit, onLongClick: () -> Unit) {
|
||||
composeView.setMD3Content {
|
||||
@@ -57,6 +58,7 @@ class ListGalleryHolder(
|
||||
info = galleryInfo,
|
||||
modifier = Modifier.height(height),
|
||||
isInFavScene = !showFavourited,
|
||||
showPages = showPages,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.hippo.ehviewer.ui.widget
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.combinedClickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
@@ -36,6 +37,7 @@ fun ListInfoCard(
|
||||
info: GalleryInfo,
|
||||
modifier: Modifier = Modifier,
|
||||
isInFavScene: Boolean = false,
|
||||
showPages: Boolean = false,
|
||||
) {
|
||||
CrystalCard(modifier = Modifier.padding(6.dp)) {
|
||||
Row(
|
||||
@@ -82,7 +84,10 @@ fun ListInfoCard(
|
||||
}
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
Column(horizontalAlignment = Alignment.End) {
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(6.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
if (DownloadManager.containDownloadInfo(info.gid)) {
|
||||
Icon(
|
||||
Icons.Default.Download,
|
||||
@@ -98,6 +103,9 @@ fun ListInfoCard(
|
||||
)
|
||||
}
|
||||
Text(text = info.simpleLanguage.orEmpty())
|
||||
if (info.pages != 0 && showPages) {
|
||||
Text(text = "${info.pages}P")
|
||||
}
|
||||
}
|
||||
Text(text = info.posted.orEmpty())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user