Replace repo icon

This commit is contained in:
Cuong-Tran 2025-03-24 19:57:53 +07:00
parent d20ea8ae2d
commit 92d0d5cc7e
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2
2 changed files with 8 additions and 15 deletions

View file

@ -20,7 +20,6 @@ import kotlinx.coroutines.async
import kotlinx.coroutines.awaitAll
import kotlinx.coroutines.runBlocking
import logcat.LogPriority
import mihon.domain.extensionrepo.interactor.CreateExtensionRepo.Companion.KOMIKKU_SIGNATURE
import mihon.domain.extensionrepo.interactor.GetExtensionRepo
import mihon.domain.extensionrepo.model.ExtensionRepo
import tachiyomi.core.common.util.system.logcat
@ -289,11 +288,10 @@ internal object ExtensionLoader {
libVersion,
signatures.last(),
// KMK -->
repoName = when {
isOfficiallySigned(signatures) -> "Komikku"
else -> repos.firstOrNull { repo ->
signatures.all { it == repo.signingKeyFingerprint }
}?.name
repoName = repos.firstOrNull { repo ->
signatures.all { it == repo.signingKeyFingerprint }
}?.let { repo ->
repo.shortName.takeIf { !it.isNullOrBlank() } ?: repo.name
},
// KMK <--
)
@ -360,11 +358,10 @@ internal object ExtensionLoader {
isShared = extensionInfo.isShared,
// KMK -->
signatureHash = signatures.last(),
repoName = when {
isOfficiallySigned(signatures) -> "Komikku"
else -> repos.firstOrNull { repo ->
signatures.all { it == repo.signingKeyFingerprint }
}?.name
repoName = repos.firstOrNull { repo ->
signatures.all { it == repo.signingKeyFingerprint }
}?.let { repo ->
repo.shortName.takeIf { !it.isNullOrBlank() } ?: repo.name
},
// KMK <--
)
@ -424,10 +421,6 @@ internal object ExtensionLoader {
?.toList()
}
private fun isOfficiallySigned(signatures: List<String>): Boolean {
return signatures.all { it == KOMIKKU_SIGNATURE }
}
/**
* On Android 13+ the ApplicationInfo generated by getPackageArchiveInfo doesn't
* have sourceDir which breaks assets loading (used for getting icon here).

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 95 KiB