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 179995feee..dba3457cd9 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 @@ -115,11 +115,9 @@ class LibraryNavigationView @JvmOverloads constructor(context: Context, attrs: A private val unread = Item.MultiSort(R.string.action_filter_unread, this) - private val source = Item.MultiSort(R.string.manga_info_source_label, this) - private val latestChapter = Item.MultiSort(R.string.action_sort_latest_chapter, this) - override val items = listOf(alphabetically, lastRead, lastUpdated, unread, total, source, latestChapter) + override val items = listOf(alphabetically, lastRead, lastUpdated, unread, total, latestChapter) override val header = Item.Header(R.string.action_sort) @@ -135,7 +133,6 @@ class LibraryNavigationView @JvmOverloads constructor(context: Context, attrs: A lastUpdated.state = if (sorting == LibrarySort.LAST_UPDATED) order else SORT_NONE unread.state = if (sorting == LibrarySort.UNREAD) order else SORT_NONE total.state = if (sorting == LibrarySort.TOTAL) order else SORT_NONE - source.state = if (sorting == LibrarySort.SOURCE) order else SORT_NONE latestChapter.state = if (sorting == LibrarySort.LATEST_CHAPTER) order else SORT_NONE } @@ -157,11 +154,10 @@ class LibraryNavigationView @JvmOverloads constructor(context: Context, attrs: A lastUpdated -> LibrarySort.LAST_UPDATED unread -> LibrarySort.UNREAD total -> LibrarySort.TOTAL - source -> LibrarySort.SOURCE latestChapter -> LibrarySort.LATEST_CHAPTER else -> throw Exception("Unknown sorting") }) - preferences.librarySortingAscending().set(if (item.state == SORT_ASC) true else false) + preferences.librarySortingAscending().set(item.state == SORT_ASC) item.group.items.forEach { adapter.notifyItemChanged(it) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt index b986af3d6b..eb7a5802fc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt @@ -206,11 +206,6 @@ class LibraryPresenter( val mange2TotalChapter = totalChapterManga[i2.manga.id!!] ?: 0 manga1TotalChapter.compareTo(mange2TotalChapter) } - LibrarySort.SOURCE -> { - val source1Name = sourceManager.getOrStub(i1.manga.source).name - val source2Name = sourceManager.getOrStub(i2.manga.source).name - source1Name.compareTo(source2Name) - } LibrarySort.LATEST_CHAPTER -> { val manga1latestChapter = latestChapterManga[i1.manga.id!!] ?: 0 val manga2latestChapter = latestChapterManga[i2.manga.id!!] ?: 0 diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySort.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySort.kt index 4108415376..feb35cf4ba 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySort.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySort.kt @@ -7,6 +7,6 @@ object LibrarySort { const val LAST_UPDATED = 2 const val UNREAD = 3 const val TOTAL = 4 - const val SOURCE = 5 const val LATEST_CHAPTER = 6 -} \ No newline at end of file + +}