diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryNavigationView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryNavigationView.kt index 9172fc0d15..8decc9b23e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryNavigationView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryNavigationView.kt @@ -5,6 +5,7 @@ import android.util.AttributeSet import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.data.preference.getOrDefault +import eu.kanade.tachiyomi.data.track.TrackManager import eu.kanade.tachiyomi.ui.catalogue.filter.TriStateItem import eu.kanade.tachiyomi.widget.ExtendedNavigationView import eu.kanade.tachiyomi.widget.ExtendedNavigationView.Item.MultiSort.Companion.SORT_ASC @@ -13,6 +14,8 @@ import eu.kanade.tachiyomi.widget.ExtendedNavigationView.Item.MultiSort.Companio import eu.kanade.tachiyomi.widget.ExtendedNavigationView.Item.TriStateGroup.Companion.STATE_IGNORE import eu.kanade.tachiyomi.widget.ExtendedNavigationView.Item.TriStateGroup.Companion.STATE_INCLUDE import eu.kanade.tachiyomi.widget.ExtendedNavigationView.Item.TriStateGroup.Companion.STATE_EXCLUDE +import uy.kohesive.injekt.Injekt +import uy.kohesive.injekt.api.get import uy.kohesive.injekt.injectLazy /** @@ -81,7 +84,9 @@ class LibraryNavigationView @JvmOverloads constructor(context: Context, attrs: A private val tracked = Item.TriStateGroup(R.string.tracked, this) - override val items = listOf(downloaded, unread, completed, tracked) + override val items = if (Injekt.get().hasLoggedServices()) + listOf(downloaded, unread, completed, tracked) else listOf(downloaded, unread, + completed) override val header = Item.Header(R.string.action_filter) @@ -93,7 +98,6 @@ class LibraryNavigationView @JvmOverloads constructor(context: Context, attrs: A unread.state = preferences.filterUnread().getOrDefault() completed.state = preferences.filterCompleted().getOrDefault() tracked.state = preferences.filterTracked().getOrDefault() - tracked } catch (e: Exception) { preferences.upgradeFilters() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackStatusDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackStatusDialog.kt index 535fd744a1..fbbb0f6faf 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackStatusDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackStatusDialog.kt @@ -40,6 +40,7 @@ class SetTrackStatusDialog : DialogController return MaterialDialog(activity!!) .title(R.string.status) .negativeButton(android.R.string.cancel) + .positiveButton(android.R.string.ok) .listItemsSingleChoice(items = statusString, initialSelection = selectedIndex) { dialog, position, _ -> (targetController as? Listener)?.setStatus(item, position)