replace EventThemeSwitch to the right place and add event to nosplash
This commit is contained in:
parent
72ed212d37
commit
0f4aed5ef5
17 changed files with 23 additions and 20 deletions
|
@ -70,7 +70,6 @@ class MainActivity : NoSplashAppCompatActivity() {
|
||||||
private val disposable = CompositeDisposable()
|
private val disposable = CompositeDisposable()
|
||||||
|
|
||||||
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
||||||
@Inject lateinit var rxBus: RxBus
|
|
||||||
@Inject lateinit var androidPermission: AndroidPermission
|
@Inject lateinit var androidPermission: AndroidPermission
|
||||||
@Inject lateinit var sp: SP
|
@Inject lateinit var sp: SP
|
||||||
@Inject lateinit var versionCheckerUtils: VersionCheckerUtils
|
@Inject lateinit var versionCheckerUtils: VersionCheckerUtils
|
||||||
|
|
|
@ -52,7 +52,6 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() {
|
||||||
|
|
||||||
@Inject lateinit var injector: HasAndroidInjector
|
@Inject lateinit var injector: HasAndroidInjector
|
||||||
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
||||||
@Inject lateinit var rxBus: RxBus
|
|
||||||
@Inject lateinit var sp: SP
|
@Inject lateinit var sp: SP
|
||||||
@Inject lateinit var profileFunction: ProfileFunction
|
@Inject lateinit var profileFunction: ProfileFunction
|
||||||
@Inject lateinit var defaultValueHelper: DefaultValueHelper
|
@Inject lateinit var defaultValueHelper: DefaultValueHelper
|
||||||
|
|
|
@ -38,7 +38,6 @@ class ProfileHelperActivity : NoSplashAppCompatActivity() {
|
||||||
@Inject lateinit var defaultProfile: DefaultProfile
|
@Inject lateinit var defaultProfile: DefaultProfile
|
||||||
@Inject lateinit var defaultProfileDPV: DefaultProfileDPV
|
@Inject lateinit var defaultProfileDPV: DefaultProfileDPV
|
||||||
@Inject lateinit var localProfilePlugin: LocalProfilePlugin
|
@Inject lateinit var localProfilePlugin: LocalProfilePlugin
|
||||||
@Inject lateinit var rxBus: RxBus
|
|
||||||
@Inject lateinit var dateUtil: DateUtil
|
@Inject lateinit var dateUtil: DateUtil
|
||||||
@Inject lateinit var activePlugin: ActivePlugin
|
@Inject lateinit var activePlugin: ActivePlugin
|
||||||
@Inject lateinit var repository: AppRepository
|
@Inject lateinit var repository: AppRepository
|
||||||
|
|
|
@ -31,7 +31,6 @@ import javax.inject.Inject
|
||||||
class SmsCommunicatorOtpActivity : NoSplashAppCompatActivity() {
|
class SmsCommunicatorOtpActivity : NoSplashAppCompatActivity() {
|
||||||
|
|
||||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||||
@Inject lateinit var rxBus: RxBus
|
|
||||||
@Inject lateinit var smsCommunicatorPlugin: SmsCommunicatorPlugin
|
@Inject lateinit var smsCommunicatorPlugin: SmsCommunicatorPlugin
|
||||||
@Inject lateinit var otp: OneTimePassword
|
@Inject lateinit var otp: OneTimePassword
|
||||||
@Inject lateinit var uel: UserEntryLogger
|
@Inject lateinit var uel: UserEntryLogger
|
||||||
|
|
|
@ -34,7 +34,6 @@ class SetupWizardActivity : NoSplashAppCompatActivity() {
|
||||||
@Inject lateinit var injector: HasAndroidInjector
|
@Inject lateinit var injector: HasAndroidInjector
|
||||||
@Inject lateinit var localProfilePlugin: LocalProfilePlugin
|
@Inject lateinit var localProfilePlugin: LocalProfilePlugin
|
||||||
@Inject lateinit var swDefinition: SWDefinition
|
@Inject lateinit var swDefinition: SWDefinition
|
||||||
@Inject lateinit var rxBus: RxBus
|
|
||||||
@Inject lateinit var sp: SP
|
@Inject lateinit var sp: SP
|
||||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||||
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
||||||
|
|
|
@ -1,15 +1,33 @@
|
||||||
package info.nightscout.androidaps.activities
|
package info.nightscout.androidaps.activities
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.androidaps.core.R
|
||||||
|
import info.nightscout.androidaps.events.EventThemeSwitch
|
||||||
|
import info.nightscout.androidaps.plugins.bus.RxBus
|
||||||
import info.nightscout.androidaps.utils.locale.LocaleHelper
|
import info.nightscout.androidaps.utils.locale.LocaleHelper
|
||||||
|
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
||||||
|
import javax.inject.Inject
|
||||||
|
|
||||||
|
|
||||||
open class NoSplashAppCompatActivity : DaggerAppCompatActivityWithResult() {
|
open class NoSplashAppCompatActivity : DaggerAppCompatActivityWithResult() {
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
@Inject lateinit var rxBus: RxBus
|
||||||
|
|
||||||
|
private val compositeDisposable = CompositeDisposable()
|
||||||
|
|
||||||
|
public override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setTheme(R.style.AppTheme_NoActionBar)
|
setTheme(R.style.AppTheme_NoActionBar)
|
||||||
|
|
||||||
|
compositeDisposable.add(rxBus.toObservable(EventThemeSwitch::class.java).subscribe {
|
||||||
|
recreate()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
compositeDisposable.clear()
|
||||||
|
super.onDestroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun attachBaseContext(newBase: Context) {
|
override fun attachBaseContext(newBase: Context) {
|
||||||
|
|
|
@ -44,7 +44,6 @@ import kotlin.math.roundToInt
|
||||||
|
|
||||||
class TDDStatsActivity : NoSplashAppCompatActivity() {
|
class TDDStatsActivity : NoSplashAppCompatActivity() {
|
||||||
|
|
||||||
@Inject lateinit var rxBus: RxBus
|
|
||||||
@Inject lateinit var sp: SP
|
@Inject lateinit var sp: SP
|
||||||
@Inject lateinit var profileFunction: ProfileFunction
|
@Inject lateinit var profileFunction: ProfileFunction
|
||||||
@Inject lateinit var activePlugin: ActivePlugin
|
@Inject lateinit var activePlugin: ActivePlugin
|
||||||
|
|
|
@ -38,7 +38,6 @@ import javax.inject.Inject
|
||||||
|
|
||||||
class DanaHistoryActivity : NoSplashAppCompatActivity() {
|
class DanaHistoryActivity : NoSplashAppCompatActivity() {
|
||||||
|
|
||||||
@Inject lateinit var rxBus: RxBus
|
|
||||||
@Inject lateinit var profileFunction: ProfileFunction
|
@Inject lateinit var profileFunction: ProfileFunction
|
||||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||||
@Inject lateinit var activePlugin: ActivePlugin
|
@Inject lateinit var activePlugin: ActivePlugin
|
||||||
|
|
|
@ -26,7 +26,6 @@ import kotlin.math.min
|
||||||
|
|
||||||
class DanaUserOptionsActivity : NoSplashAppCompatActivity() {
|
class DanaUserOptionsActivity : NoSplashAppCompatActivity() {
|
||||||
|
|
||||||
@Inject lateinit var rxBus: RxBus
|
|
||||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||||
@Inject lateinit var context: Context
|
@Inject lateinit var context: Context
|
||||||
@Inject lateinit var danaPump: DanaPump
|
@Inject lateinit var danaPump: DanaPump
|
||||||
|
|
|
@ -30,7 +30,6 @@ import javax.inject.Inject
|
||||||
class BLEScanActivity : NoSplashAppCompatActivity() {
|
class BLEScanActivity : NoSplashAppCompatActivity() {
|
||||||
|
|
||||||
@Inject lateinit var sp: SP
|
@Inject lateinit var sp: SP
|
||||||
@Inject lateinit var rxBus: RxBus
|
|
||||||
@Inject lateinit var blePreCheck: BlePreCheck
|
@Inject lateinit var blePreCheck: BlePreCheck
|
||||||
@Inject lateinit var context: Context
|
@Inject lateinit var context: Context
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@ import kotlin.experimental.xor
|
||||||
|
|
||||||
class EnterPinActivity : NoSplashAppCompatActivity() {
|
class EnterPinActivity : NoSplashAppCompatActivity() {
|
||||||
|
|
||||||
@Inject lateinit var rxBus: RxBus
|
|
||||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||||
@Inject lateinit var danaRSPlugin: DanaRSPlugin
|
@Inject lateinit var danaRSPlugin: DanaRSPlugin
|
||||||
@Inject lateinit var sp: SP
|
@Inject lateinit var sp: SP
|
||||||
|
|
|
@ -32,7 +32,6 @@ import javax.inject.Inject
|
||||||
class DiaconnG8BLEScanActivity : NoSplashAppCompatActivity() {
|
class DiaconnG8BLEScanActivity : NoSplashAppCompatActivity() {
|
||||||
|
|
||||||
@Inject lateinit var sp: SP
|
@Inject lateinit var sp: SP
|
||||||
@Inject lateinit var rxBus: RxBus
|
|
||||||
@Inject lateinit var blePreCheck: BlePreCheck
|
@Inject lateinit var blePreCheck: BlePreCheck
|
||||||
@Inject lateinit var context: Context
|
@Inject lateinit var context: Context
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,6 @@ import javax.inject.Inject
|
||||||
|
|
||||||
class DiaconnG8HistoryActivity : NoSplashAppCompatActivity() {
|
class DiaconnG8HistoryActivity : NoSplashAppCompatActivity() {
|
||||||
|
|
||||||
@Inject lateinit var rxBus: RxBus
|
|
||||||
@Inject lateinit var profileFunction: ProfileFunction
|
@Inject lateinit var profileFunction: ProfileFunction
|
||||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||||
@Inject lateinit var activePlugin: ActivePlugin
|
@Inject lateinit var activePlugin: ActivePlugin
|
||||||
|
|
|
@ -25,7 +25,6 @@ import javax.inject.Inject
|
||||||
|
|
||||||
class DiaconnG8UserOptionsActivity : NoSplashAppCompatActivity() {
|
class DiaconnG8UserOptionsActivity : NoSplashAppCompatActivity() {
|
||||||
|
|
||||||
@Inject lateinit var rxBus: RxBus
|
|
||||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||||
@Inject lateinit var context: Context
|
@Inject lateinit var context: Context
|
||||||
@Inject lateinit var diaconnG8Pump: DiaconnG8Pump
|
@Inject lateinit var diaconnG8Pump: DiaconnG8Pump
|
||||||
|
|
|
@ -28,7 +28,6 @@ import javax.inject.Inject
|
||||||
|
|
||||||
class DashPodManagementActivity : NoSplashAppCompatActivity() {
|
class DashPodManagementActivity : NoSplashAppCompatActivity() {
|
||||||
|
|
||||||
@Inject lateinit var rxBus: RxBus
|
|
||||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||||
@Inject lateinit var commandQueue: CommandQueue
|
@Inject lateinit var commandQueue: CommandQueue
|
||||||
@Inject lateinit var injector: HasAndroidInjector
|
@Inject lateinit var injector: HasAndroidInjector
|
||||||
|
|
|
@ -43,7 +43,6 @@ import javax.inject.Inject
|
||||||
*/
|
*/
|
||||||
class ErosPodManagementActivity : NoSplashAppCompatActivity() {
|
class ErosPodManagementActivity : NoSplashAppCompatActivity() {
|
||||||
|
|
||||||
@Inject lateinit var rxBus: RxBus
|
|
||||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||||
@Inject lateinit var commandQueue: CommandQueue
|
@Inject lateinit var commandQueue: CommandQueue
|
||||||
@Inject lateinit var podStateManager: ErosPodStateManager
|
@Inject lateinit var podStateManager: ErosPodStateManager
|
||||||
|
|
Loading…
Reference in a new issue