Looks like no need to check theme change at onCreate

Removed possible intent action when onCreate is done
This commit is contained in:
Juha Heinanen
2021-01-12 09:37:11 +02:00
parent 23f5032777
commit 9153c6e611

View File

@ -68,11 +68,6 @@ class MainActivity : AppCompatActivity() {
@SuppressLint("ClickableViewAccessibility")
override fun onCreate(savedInstanceState: Bundle?) {
if (Preferences(applicationContext).displayTheme != AppCompatDelegate.getDefaultNightMode()) {
AppCompatDelegate.setDefaultNightMode(Preferences(applicationContext).displayTheme)
delegate.applyDayNight()
}
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
@ -484,6 +479,8 @@ class MainActivity : AppCompatActivity() {
startBaresip()
}
intent.removeExtra("action")
} // OnCreate
override fun onNewIntent(intent: Intent) {