refactor: move app intro after language picker

This commit is contained in:
andrekir 2023-11-03 18:57:44 -03:00
parent a7b0d70c03
commit c6a97e7cc8

View file

@ -189,10 +189,6 @@ class MainActivity : AppCompatActivity(), Logging {
if (savedInstanceState == null) {
val prefs = UIViewModel.getPreferences(this)
// First run: show AppIntroduction
if (!prefs.getBoolean("app_intro_completed", false)) {
startActivity(Intent(this, AppIntroduction::class.java))
}
// First run: migrate in-app language prefs to appcompat
val lang = prefs.getString("lang", LanguageUtils.SYSTEM_DEFAULT)
if (lang != LanguageUtils.SYSTEM_MANAGED) LanguageUtils.migrateLanguagePrefs(prefs)
@ -201,6 +197,10 @@ class MainActivity : AppCompatActivity(), Logging {
AppCompatDelegate.setDefaultNightMode(
prefs.getInt("theme", AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)
)
// First run: show AppIntroduction
if (!prefs.getBoolean("app_intro_completed", false)) {
startActivity(Intent(this, AppIntroduction::class.java))
}
// Ask user to rate in play store
(application as GeeksvilleApplication).askToRate(this)
}