Maintain source info in the database. (#6389)
* Maintain Source Info in database * Review changes and cleanups * Review changes 2 * Review Changes 3
This commit is contained in:
@@ -1140,7 +1140,9 @@ class MangaController :
|
||||
|
||||
private fun downloadChapters(chapters: List<ChapterItem>) {
|
||||
if (source is SourceManager.StubSource) {
|
||||
activity?.toast(R.string.loader_not_implemented_error)
|
||||
activity?.let {
|
||||
it.toast(it.getString(R.string.source_not_installed, source?.toString().orEmpty()))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -228,11 +228,7 @@ class MangaInfoHeaderAdapter(
|
||||
*/
|
||||
private fun setMangaInfo() {
|
||||
// Update full title TextView.
|
||||
binding.mangaFullTitle.text = if (manga.title.isBlank()) {
|
||||
view.context.getString(R.string.unknown)
|
||||
} else {
|
||||
manga.title
|
||||
}
|
||||
binding.mangaFullTitle.text = manga.title.ifBlank { view.context.getString(R.string.unknown) }
|
||||
|
||||
// Update author TextView.
|
||||
binding.mangaAuthor.text = if (manga.author.isNullOrBlank()) {
|
||||
@@ -249,6 +245,8 @@ class MangaInfoHeaderAdapter(
|
||||
}
|
||||
|
||||
// If manga source is known update source TextView.
|
||||
binding.mangaMissingSourceIcon.isVisible = source is SourceManager.StubSource
|
||||
|
||||
val mangaSource = source.toString()
|
||||
with(binding.mangaSource) {
|
||||
val enabledLanguages = preferences.enabledLanguages().get()
|
||||
|
||||
Reference in New Issue
Block a user