fix null currentActivity

This commit is contained in:
andrekir 2022-09-13 01:25:36 -03:00
parent 99e9502a29
commit c2d681b11e
3 changed files with 19 additions and 42 deletions

View file

@ -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)