mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix null currentActivity
This commit is contained in:
parent
99e9502a29
commit
c2d681b11e
3 changed files with 19 additions and 42 deletions
|
|
@ -263,20 +263,16 @@ class MainActivity : BaseActivity(), Logging {
|
|||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
val preferences = getSharedPreferences("PREFERENCES", Context.MODE_PRIVATE)
|
||||
|
||||
installSplashScreen()
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
if (!preferences.getBoolean("app_intro_completed", false)) {
|
||||
val prefs = UIViewModel.getPreferences(this)
|
||||
if (!prefs.getBoolean("app_intro_completed", false)) {
|
||||
startActivity(Intent(this, AppIntroduction::class.java))
|
||||
}
|
||||
|
||||
binding = ActivityMainBinding.inflate(layoutInflater)
|
||||
|
||||
val prefs = UIViewModel.getPreferences(this)
|
||||
model.setOwner(prefs.getString("owner", ""))
|
||||
|
||||
/// Set theme
|
||||
setUITheme(prefs)
|
||||
setContentView(binding.root)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue