Looks like no need to check theme change at onCreate
Removed possible intent action when onCreate is done
This commit is contained in:
@@ -68,11 +68,6 @@ class MainActivity : AppCompatActivity() {
|
|||||||
@SuppressLint("ClickableViewAccessibility")
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
|
||||||
if (Preferences(applicationContext).displayTheme != AppCompatDelegate.getDefaultNightMode()) {
|
|
||||||
AppCompatDelegate.setDefaultNightMode(Preferences(applicationContext).displayTheme)
|
|
||||||
delegate.applyDayNight()
|
|
||||||
}
|
|
||||||
|
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
binding = ActivityMainBinding.inflate(layoutInflater)
|
binding = ActivityMainBinding.inflate(layoutInflater)
|
||||||
|
|
||||||
@@ -484,6 +479,8 @@ class MainActivity : AppCompatActivity() {
|
|||||||
startBaresip()
|
startBaresip()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
intent.removeExtra("action")
|
||||||
|
|
||||||
} // OnCreate
|
} // OnCreate
|
||||||
|
|
||||||
override fun onNewIntent(intent: Intent) {
|
override fun onNewIntent(intent: Intent) {
|
||||||
|
|||||||
Reference in New Issue
Block a user