From 688cc64dffa8cdf1241d3b4e2467b5e8c8529800 Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 6 Aug 2022 16:23:13 -0400 Subject: [PATCH] Minor fixes - Fix categories modal showing when adding from source with no categories - Use old categories icon in library bottom action menu --- .../kanade/presentation/components/MangaBottomActionMenu.kt | 3 ++- app/src/main/java/eu/kanade/tachiyomi/App.kt | 4 ++-- app/src/main/java/eu/kanade/tachiyomi/AppInfo.kt | 1 + .../ui/browse/source/browse/BrowseSourcePresenter.kt | 5 ++++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/presentation/components/MangaBottomActionMenu.kt b/app/src/main/java/eu/kanade/presentation/components/MangaBottomActionMenu.kt index 0ab3b89656..b465f0bc90 100644 --- a/app/src/main/java/eu/kanade/presentation/components/MangaBottomActionMenu.kt +++ b/app/src/main/java/eu/kanade/presentation/components/MangaBottomActionMenu.kt @@ -23,6 +23,7 @@ import androidx.compose.material.icons.filled.DoneAll import androidx.compose.material.icons.filled.RemoveDone import androidx.compose.material.icons.outlined.Delete import androidx.compose.material.icons.outlined.Download +import androidx.compose.material.icons.outlined.Label import androidx.compose.material.ripple.rememberRipple import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -238,7 +239,7 @@ fun LibraryBottomActionMenu( if (onChangeCategoryClicked != null) { Button( title = stringResource(R.string.action_move_category), - icon = Icons.Default.BookmarkAdd, + icon = Icons.Outlined.Label, toConfirm = confirm[0], onLongClick = { onLongClickItem(0) }, onClick = onChangeCategoryClicked, diff --git a/app/src/main/java/eu/kanade/tachiyomi/App.kt b/app/src/main/java/eu/kanade/tachiyomi/App.kt index 7495af59de..90bc076c30 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/App.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/App.kt @@ -202,7 +202,7 @@ class App : Application(), DefaultLifecycleObserver, ImageLoaderFactory { return super.getPackageName() } - protected open fun setupAcra() { + private fun setupAcra() { if (isDevFlavor.not()) { initAcra { buildConfigClass = BuildConfig::class.java @@ -216,7 +216,7 @@ class App : Application(), DefaultLifecycleObserver, ImageLoaderFactory { } } - protected open fun setupNotificationChannels() { + private fun setupNotificationChannels() { try { Notifications.createChannels(this) } catch (e: Exception) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/AppInfo.kt b/app/src/main/java/eu/kanade/tachiyomi/AppInfo.kt index 7ec80cdb67..96e681f418 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/AppInfo.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/AppInfo.kt @@ -5,6 +5,7 @@ package eu.kanade.tachiyomi * * @since extension-lib 1.3 */ +@Suppress("UNUSED") object AppInfo { fun getVersionCode() = BuildConfig.VERSION_CODE fun getVersionName() = BuildConfig.VERSION_NAME diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourcePresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourcePresenter.kt index 29f02e80af..a26e8989cd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourcePresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourcePresenter.kt @@ -387,7 +387,10 @@ open class BrowseSourcePresenter( * @return List of categories, not including the default category */ suspend fun getCategories(): List { - return getCategories.subscribe().firstOrNull() ?: emptyList() + return getCategories.subscribe() + .firstOrNull() + ?.filterNot { it.id == DomainCategory.UNCATEGORIZED_ID } + ?: emptyList() } suspend fun getDuplicateLibraryManga(manga: DomainManga): DomainManga? {