mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 05:25:08 +01:00
Fixed #267
This commit is contained in:
parent
acfc81b9b9
commit
71b86d7ba1
@ -1,6 +1,5 @@
|
||||
package eu.kanade.tachiyomi.ui.extension
|
||||
|
||||
import android.app.Application
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import eu.kanade.tachiyomi.data.preference.getOrDefault
|
||||
@ -73,7 +72,7 @@ class ExtensionBottomPresenter(
|
||||
|
||||
@Synchronized
|
||||
private fun toItems(tuple: ExtensionTuple): List<ExtensionItem> {
|
||||
val context = Injekt.get<Application>()
|
||||
val context = bottomSheet.context
|
||||
val activeLangs = preferences.enabledLanguages().getOrDefault()
|
||||
|
||||
val (installed, untrusted, available) = tuple
|
||||
|
@ -23,9 +23,9 @@ class MigrationMangaDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
|
||||
|
||||
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
||||
val confirmRes = if (copy) R.plurals.copy_manga else R.plurals.migrate_manga
|
||||
val confirmString = applicationContext?.resources?.getQuantityString(confirmRes, mangaSet,
|
||||
val confirmString = activity?.resources?.getQuantityString(confirmRes, mangaSet,
|
||||
mangaSet, (
|
||||
if (mangaSkipped > 0) " " + applicationContext?.getString(R.string.skipping_, mangaSkipped)
|
||||
if (mangaSkipped > 0) " " + view?.context?.getString(R.string.skipping_, mangaSkipped)
|
||||
else "")) ?: ""
|
||||
return MaterialDialog(activity!!).show {
|
||||
message(text = confirmString)
|
||||
|
@ -107,7 +107,7 @@ class MigrationProcessHolder(
|
||||
} else {
|
||||
migration_manga_card_to.progress.gone()
|
||||
migration_manga_card_to.title.text =
|
||||
view.context.applicationContext.getString(R.string.no_alternatives_found)
|
||||
view.context.getString(R.string.no_alternatives_found)
|
||||
}
|
||||
migration_menu.visible()
|
||||
skip_manga.gone()
|
||||
|
@ -90,8 +90,8 @@ class SourceController : NucleusController<SourcePresenter>(),
|
||||
|
||||
override fun getTitle(): String? {
|
||||
return if (showingExtensions)
|
||||
applicationContext?.getString(R.string.extensions)
|
||||
else applicationContext?.getString(R.string.sources)
|
||||
view?.context?.getString(R.string.extensions)
|
||||
else view?.context?.getString(R.string.sources)
|
||||
}
|
||||
|
||||
override fun createPresenter(): SourcePresenter {
|
||||
@ -304,7 +304,7 @@ class SourceController : NucleusController<SourcePresenter>(),
|
||||
val searchView = searchItem.actionView as SearchView
|
||||
|
||||
// Change hint to show global search.
|
||||
searchView.queryHint = applicationContext?.getString(R.string.search_extensions)
|
||||
searchView.queryHint = view?.context?.getString(R.string.search_extensions)
|
||||
|
||||
// Create query listener which opens the global search view.
|
||||
setOnQueryTextChangeListener(searchView) {
|
||||
@ -321,7 +321,7 @@ class SourceController : NucleusController<SourcePresenter>(),
|
||||
val searchView = searchItem.actionView as SearchView
|
||||
|
||||
// Change hint to show global search.
|
||||
searchView.queryHint = applicationContext?.getString(R.string.global_search)
|
||||
searchView.queryHint = view?.context?.getString(R.string.global_search)
|
||||
|
||||
// Create query listener which opens the global search view.
|
||||
setOnQueryTextChangeListener(searchView, true) {
|
||||
|
Loading…
Reference in New Issue
Block a user