diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/AnimeDownloadNotifier.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/AnimeDownloadNotifier.kt index a3542504c..cec0ec16f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/AnimeDownloadNotifier.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/AnimeDownloadNotifier.kt @@ -104,6 +104,7 @@ internal class AnimeDownloadNotifier(private val context: Context) { if (preferences.hideNotificationContent()) { setContentTitle(downloadingProgressText) + setContentText(null) } else { val title = download.anime.title.chop(15) val quotedTitle = Pattern.quote(title) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadNotifier.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadNotifier.kt index c5af10a41..d3c7b46a8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadNotifier.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadNotifier.kt @@ -105,6 +105,7 @@ internal class DownloadNotifier(private val context: Context) { if (preferences.hideNotificationContent()) { setContentTitle(downloadingProgressText) + setContentText(null) } else { val title = download.manga.title.chop(15) val quotedTitle = Pattern.quote(title) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSorter.kt b/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSorter.kt index bce8fc6cb..764f00491 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSorter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSorter.kt @@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.util.chapter import eu.kanade.tachiyomi.data.database.models.Chapter import eu.kanade.tachiyomi.data.database.models.Manga +import eu.kanade.tachiyomi.util.lang.compareToCaseInsensitiveNaturalOrder fun getChapterSort(manga: Manga, sortDescending: Boolean = manga.sortDescending()): (Chapter, Chapter) -> Int { return when (manga.sorting) { @@ -10,8 +11,8 @@ fun getChapterSort(manga: Manga, sortDescending: Boolean = manga.sortDescending( false -> { c1, c2 -> c2.source_order.compareTo(c1.source_order) } } Manga.CHAPTER_SORTING_NUMBER -> when (sortDescending) { - true -> { c1, c2 -> c2.chapter_number.compareTo(c1.chapter_number) } - false -> { c1, c2 -> c1.chapter_number.compareTo(c2.chapter_number) } + true -> { c1, c2 -> c2.chapter_number.toString().compareToCaseInsensitiveNaturalOrder(c1.chapter_number.toString()) } + false -> { c1, c2 -> c1.chapter_number.toString().compareToCaseInsensitiveNaturalOrder(c2.chapter_number.toString()) } } Manga.CHAPTER_SORTING_UPLOAD_DATE -> when (sortDescending) { true -> { c1, c2 -> c2.date_upload.compareTo(c1.date_upload) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/episode/EpisodeSorter.kt b/app/src/main/java/eu/kanade/tachiyomi/util/episode/EpisodeSorter.kt index 397ba34e3..cc67236cb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/episode/EpisodeSorter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/episode/EpisodeSorter.kt @@ -2,16 +2,17 @@ package eu.kanade.tachiyomi.util.episode import eu.kanade.tachiyomi.data.database.models.Anime import eu.kanade.tachiyomi.data.database.models.Episode +import eu.kanade.tachiyomi.util.lang.compareToCaseInsensitiveNaturalOrder fun getEpisodeSort(anime: Anime, sortDescending: Boolean = anime.sortDescending()): (Episode, Episode) -> Int { return when (anime.sorting) { Anime.EPISODE_SORTING_SOURCE -> when (sortDescending) { - true -> { c1, c2 -> c1.source_order.compareTo(c2.source_order) } - false -> { c1, c2 -> c2.source_order.compareTo(c1.source_order) } + true -> { e1, e2 -> e1.source_order.compareTo(e2.source_order) } + false -> { e1, e2 -> e2.source_order.compareTo(e1.source_order) } } Anime.EPISODE_SORTING_NUMBER -> when (sortDescending) { - true -> { e1, e2 -> e2.episode_number.compareTo(e1.episode_number) } - false -> { e1, e2 -> e1.episode_number.compareTo(e2.episode_number) } + true -> { e1, e2 -> e2.episode_number.toString().compareToCaseInsensitiveNaturalOrder(e1.episode_number.toString()) } + false -> { e1, e2 -> e1.episode_number.toString().compareToCaseInsensitiveNaturalOrder(e2.episode_number.toString()) } } Anime.EPISODE_SORTING_UPLOAD_DATE -> when (sortDescending) { true -> { e1, e2 -> e2.date_upload.compareTo(e1.date_upload) }