Localize "No chapters found" error

This commit is contained in:
arkon
2020-09-04 15:21:09 -04:00
parent 7a33e198dc
commit 66baf01e43
6 changed files with 30 additions and 9 deletions

View File

@@ -65,6 +65,7 @@ import eu.kanade.tachiyomi.ui.reader.ReaderActivity
import eu.kanade.tachiyomi.ui.recent.history.HistoryController
import eu.kanade.tachiyomi.ui.recent.updates.UpdatesController
import eu.kanade.tachiyomi.ui.webview.WebViewActivity
import eu.kanade.tachiyomi.util.chapter.NoChaptersException
import eu.kanade.tachiyomi.util.hasCustomCover
import eu.kanade.tachiyomi.util.system.getResourceColor
import eu.kanade.tachiyomi.util.system.toast
@@ -696,7 +697,11 @@ class MangaController :
fun onFetchChaptersError(error: Throwable) {
isRefreshingChapters = false
updateRefreshing()
activity?.toast(error.message)
if (error is NoChaptersException) {
activity?.toast(activity?.getString(R.string.no_chapters_error))
} else {
activity?.toast(error.message)
}
}
fun onChapterStatusChange(download: Download) {