From f3c018f6b48cfdc91c8b31b62896a38d56e9c4ee Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 28 Mar 2018 18:38:36 +0200 Subject: [PATCH] get a db reference at app launch just to make sure it is initialized --- .../com/simplemobiletools/clock/activities/MainActivity.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/clock/activities/MainActivity.kt index 2850334f..dcfa8309 100644 --- a/app/src/main/kotlin/com/simplemobiletools/clock/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/clock/activities/MainActivity.kt @@ -10,6 +10,7 @@ import com.simplemobiletools.clock.BuildConfig import com.simplemobiletools.clock.R import com.simplemobiletools.clock.adapters.ViewPagerAdapter import com.simplemobiletools.clock.extensions.config +import com.simplemobiletools.clock.extensions.dbHelper import com.simplemobiletools.clock.extensions.getNextAlarm import com.simplemobiletools.clock.extensions.rescheduleEnabledAlarms import com.simplemobiletools.clock.helpers.OPEN_TAB @@ -31,6 +32,10 @@ class MainActivity : SimpleActivity() { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) appLaunched() + + // just get a reference to the database to make sure it is created properly + dbHelper + storeStateVariables() initFragments()