Merge branch 'localefix'

This commit is contained in:
jmir1 2021-08-10 12:05:20 +02:00
commit c514fec3fa
4 changed files with 6 additions and 6 deletions

View file

@ -53,7 +53,7 @@ open class AnimeExtensionController :
}
override fun createPresenter(): AnimeExtensionPresenter {
return AnimeExtensionPresenter()
return AnimeExtensionPresenter(activity!!)
}
override fun createBinding(inflater: LayoutInflater) = ExtensionControllerBinding.inflate(inflater)

View file

@ -1,6 +1,6 @@
package eu.kanade.tachiyomi.ui.browse.animeextension
import android.app.Application
import android.content.Context
import android.os.Bundle
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
@ -23,6 +23,7 @@ private typealias AnimeExtensionTuple =
* Presenter of [AnimeExtensionController].
*/
open class AnimeExtensionPresenter(
private val context: Context,
private val extensionManager: AnimeExtensionManager = Injekt.get(),
private val preferences: PreferencesHelper = Injekt.get()
) : BasePresenter<AnimeExtensionController>() {
@ -52,7 +53,6 @@ open class AnimeExtensionPresenter(
@Synchronized
private fun toItems(tuple: AnimeExtensionTuple): List<AnimeExtensionItem> {
val context = Injekt.get<Application>()
val activeLangs = preferences.enabledLanguages().get()
val showNsfwExtensions = preferences.showNsfwExtension().get()

View file

@ -53,7 +53,7 @@ open class ExtensionController :
}
override fun createPresenter(): ExtensionPresenter {
return ExtensionPresenter()
return ExtensionPresenter(activity!!)
}
override fun createBinding(inflater: LayoutInflater) = ExtensionControllerBinding.inflate(inflater)

View file

@ -1,6 +1,6 @@
package eu.kanade.tachiyomi.ui.browse.extension
import android.app.Application
import android.content.Context
import android.os.Bundle
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
@ -23,6 +23,7 @@ private typealias ExtensionTuple =
* Presenter of [ExtensionController].
*/
open class ExtensionPresenter(
private val context: Context,
private val extensionManager: ExtensionManager = Injekt.get(),
private val preferences: PreferencesHelper = Injekt.get()
) : BasePresenter<ExtensionController>() {
@ -53,7 +54,6 @@ open class ExtensionPresenter(
@Synchronized
private fun toItems(tuple: ExtensionTuple): List<ExtensionItem> {
val context = Injekt.get<Application>()
val activeLangs = preferences.enabledLanguages().get()
val showNsfwExtensions = preferences.showNsfwExtension().get()