diff --git a/app/src/main/java/eu/kanade/presentation/browse/components/BrowseIcons.kt b/app/src/main/java/eu/kanade/presentation/browse/components/BrowseIcons.kt index 1d37ca50b..45526d5df 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/components/BrowseIcons.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/components/BrowseIcons.kt @@ -31,6 +31,7 @@ import eu.kanade.domain.source.model.Source import eu.kanade.presentation.util.rememberResourceBitmapPainter import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.extension.model.Extension +import eu.kanade.tachiyomi.source.LocalSource import eu.kanade.tachiyomi.util.lang.withIOContext private val defaultModifier = Modifier @@ -60,13 +61,20 @@ fun SourceIcon( modifier = modifier.then(defaultModifier), ) } - else -> { + source.id == LocalSource.ID -> { Image( painter = painterResource(R.mipmap.ic_local_source), contentDescription = null, modifier = modifier.then(defaultModifier), ) } + else -> { + Image( + painter = painterResource(R.mipmap.ic_default_source), + contentDescription = null, + modifier = modifier.then(defaultModifier), + ) + } } } @@ -90,17 +98,17 @@ fun ExtensionIcon( is Extension.Installed -> { val icon by extension.getIcon(density) when (icon) { - Result.Error -> Image( - bitmap = ImageBitmap.imageResource(id = R.mipmap.ic_local_source), - contentDescription = null, - modifier = modifier, - ) Result.Loading -> Box(modifier = modifier) is Result.Success -> Image( bitmap = (icon as Result.Success).value, contentDescription = null, modifier = modifier, ) + Result.Error -> Image( + bitmap = ImageBitmap.imageResource(id = R.mipmap.ic_default_source), + contentDescription = null, + modifier = modifier, + ) } } is Extension.Untrusted -> Image( diff --git a/app/src/main/res/mipmap-hdpi/ic_default_source.webp b/app/src/main/res/mipmap-hdpi/ic_default_source.webp new file mode 100644 index 000000000..87baab9bd Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_default_source.webp differ diff --git a/app/src/main/res/mipmap-hdpi/ic_local_source.webp b/app/src/main/res/mipmap-hdpi/ic_local_source.webp index 87baab9bd..406c5bd47 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_local_source.webp and b/app/src/main/res/mipmap-hdpi/ic_local_source.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_default_source.webp b/app/src/main/res/mipmap-mdpi/ic_default_source.webp new file mode 100644 index 000000000..d2104a55e Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_default_source.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_local_source.webp b/app/src/main/res/mipmap-mdpi/ic_local_source.webp index d2104a55e..cfd88e75e 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_local_source.webp and b/app/src/main/res/mipmap-mdpi/ic_local_source.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_default_source.webp b/app/src/main/res/mipmap-xhdpi/ic_default_source.webp new file mode 100644 index 000000000..1dc0b9673 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_default_source.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_local_source.webp b/app/src/main/res/mipmap-xhdpi/ic_local_source.webp index 1dc0b9673..8021de84c 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_local_source.webp and b/app/src/main/res/mipmap-xhdpi/ic_local_source.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_default_source.webp b/app/src/main/res/mipmap-xxhdpi/ic_default_source.webp new file mode 100644 index 000000000..3e5d44986 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_default_source.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_local_source.webp b/app/src/main/res/mipmap-xxhdpi/ic_local_source.webp index 3e5d44986..1f10a3640 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_local_source.webp and b/app/src/main/res/mipmap-xxhdpi/ic_local_source.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_default_source.webp b/app/src/main/res/mipmap-xxxhdpi/ic_default_source.webp new file mode 100644 index 000000000..5cd7482c4 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_default_source.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_local_source.webp b/app/src/main/res/mipmap-xxxhdpi/ic_local_source.webp index 5cd7482c4..80acaf13d 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_local_source.webp and b/app/src/main/res/mipmap-xxxhdpi/ic_local_source.webp differ