Fixed reader background not following amoled

Fixes #930
This commit is contained in:
Jays2Kings 2021-07-15 22:29:56 -04:00
parent 83a831371e
commit f6ebd98f50

View File

@ -1,16 +1,21 @@
package eu.kanade.tachiyomi.ui.base.activity
import android.content.Context
import android.content.res.Resources
import android.os.Bundle
import androidx.lifecycle.lifecycleScope
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
import eu.kanade.tachiyomi.ui.security.SecureActivityDelegate
import eu.kanade.tachiyomi.util.system.LocaleHelper
import eu.kanade.tachiyomi.util.system.getThemeWithExtras
import nucleus.view.NucleusAppCompatActivity
import uy.kohesive.injekt.injectLazy
abstract class BaseRxActivity<P : BasePresenter<*>> : NucleusAppCompatActivity<P>() {
val scope = lifecycleScope
private val preferences by injectLazy<PreferencesHelper>()
override fun attachBaseContext(newBase: Context) {
super.attachBaseContext(LocaleHelper.createLocaleWrapper(newBase))
@ -25,4 +30,8 @@ abstract class BaseRxActivity<P : BasePresenter<*>> : NucleusAppCompatActivity<P
super.onResume()
SecureActivityDelegate.promptLockIfNeeded(this)
}
override fun getTheme(): Resources.Theme {
return getThemeWithExtras(super.getTheme(), preferences)
}
}