Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afbe0a4de5 | ||
|
|
0a5cdf7c80 | ||
|
|
9d689923ac | ||
|
|
98c5ae7490 | ||
|
|
868ac22c69 | ||
|
|
636ac64692 | ||
|
|
a9eec6a783 |
No files matched your search
@@ -57,8 +57,8 @@ android {
|
||||
applicationId = "moe.tarsin.ehviewer"
|
||||
minSdk = 28
|
||||
targetSdk = 33
|
||||
versionCode = 180040
|
||||
versionName = "1.8.8.1"
|
||||
versionCode = 180042
|
||||
versionName = "1.8.8.3"
|
||||
resourceConfigurations.addAll(
|
||||
listOf(
|
||||
"zh",
|
||||
|
||||
@@ -41,7 +41,7 @@ fun SpiderInfo.write(file: UniFile) {
|
||||
suspend fun SpiderInfo.saveToCache() {
|
||||
runSuspendCatching {
|
||||
spiderInfoCache.edit(gid.toString()) {
|
||||
data.toFile().writeBytes(Cbor.encodeToByteArray(this))
|
||||
data.toFile().writeBytes(Cbor.encodeToByteArray(this@saveToCache))
|
||||
}
|
||||
}.onFailure {
|
||||
it.printStackTrace()
|
||||
|
||||
@@ -39,7 +39,7 @@ fun EhAsyncCropThumb(
|
||||
key: GalleryInfo,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
var contentScale by remember { mutableStateOf(ContentScale.Fit) }
|
||||
var contentScale by remember(key.gid) { mutableStateOf(ContentScale.Fit) }
|
||||
AsyncImage(
|
||||
model = requestOf(key),
|
||||
contentDescription = null,
|
||||
|
||||
@@ -129,7 +129,7 @@ fun GalleryInfoGridItem(
|
||||
info: GalleryInfo,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
val aspect = (info.thumbWidth.toFloat() / info.thumbHeight).coerceIn(0.33F, 1.5F)
|
||||
val aspect = (info.thumbWidth.toFloat() / info.thumbHeight).coerceIn(0.33F, 1.5F).takeUnless { it.isNaN() } ?: 1F
|
||||
val color = EhUtils.getCategoryColor(info.category)
|
||||
val simpleLang = info.simpleLanguage
|
||||
ElevatedCard(
|
||||
|
||||
@@ -44,7 +44,7 @@ fun EhAsyncPreview(
|
||||
model: GalleryPreview,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
var contentScale by remember { mutableStateOf(ContentScale.Fit) }
|
||||
var contentScale by remember(model.imageKey) { mutableStateOf(ContentScale.Fit) }
|
||||
AsyncImage(
|
||||
model = requestOf(model),
|
||||
contentDescription = null,
|
||||
|
||||
@@ -1253,10 +1253,10 @@ private fun CompanionAsyncThumb(
|
||||
path: UniFile,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
var contentScale by remember { mutableStateOf(ContentScale.Fit) }
|
||||
var contentScale by remember(info.gid) { mutableStateOf(ContentScale.Fit) }
|
||||
val coroutineScope = rememberCoroutineScope { Dispatchers.IO }
|
||||
val context = LocalContext.current
|
||||
var localReq by remember {
|
||||
var localReq by remember(info.gid) {
|
||||
path.takeIf { it.isFile }?.uri?.let {
|
||||
context.imageRequest {
|
||||
data(it.toString())
|
||||
|
||||
Reference in new issue
Block a user