Change error message for when source is not installed

This commit is contained in:
Jay 2020-05-21 13:28:40 -04:00
parent a5f7f63469
commit 172702e177
3 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,6 @@
package eu.kanade.tachiyomi.ui.reader.loader
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.data.download.DownloadManager
import eu.kanade.tachiyomi.source.LocalSource
@ -84,7 +85,7 @@ class ChapterLoader(
is LocalSource.Format.Epub -> EpubPageLoader(format.file)
}
}
else -> error("Loader not implemented")
else -> error(downloadManager.context.getString(R.string.source_not_installed))
}
}
}

View File

@ -70,7 +70,7 @@ class SettingsBrowseController : SettingsController() {
(preferences.pinnedCatalogues().get() ?: emptySet()).joinToString("/")
preferences.migrationSources().set(pinnedSources)
(activity as? MainActivity)?.setUndoSnackBar(view?.snack(
R.string.migration_sources_set
R.string.migration_sources_changed
) {
setAction(R.string.undo) {
preferences.migrationSources().set(ogSources)
@ -92,7 +92,9 @@ class SettingsBrowseController : SettingsController() {
.sortedBy { "(${it.lang}) ${it.name}" }
.joinToString("/") { it.id.toString() }
preferences.migrationSources().set(enabledSources)
(activity as? MainActivity)?.setUndoSnackBar(view?.snack(R.string.migration_sources_set) {
(activity as? MainActivity)?.setUndoSnackBar(view?.snack(
R.string.migration_sources_changed
) {
setAction(R.string.undo) {
preferences.migrationSources().set(ogSources)
}

View File

@ -386,6 +386,7 @@
<string name="failed_to_update_cover">Failed to update cover</string>
<string name="must_be_in_library_to_edit">Manga must be in your library to edit</string>
<string name="remember_this_choice">Remember this choice</string>
<string name="source_not_installed">Source not installed</string>
<plurals name="deleted_chapters">
<item quantity="one">A chapter has been removed from the source:\n%2$s\nDelete
its download?</item>
@ -560,7 +561,7 @@
migration</string>
<string name="use_last_saved_migration_preferences">Use last saved pre-migration preferences
and sources to mass migrate</string>
<string name="migration_sources_set">Migration sources set</string>
<string name="migration_sources_changed">Migration sources changed</string>
<string name="you_can_migrate_in_library">You can also migrate by selecting manga in your
library</string>