using a helper function for ensuring background thread
This commit is contained in:
parent
c226f900e8
commit
1d4113545a
|
@ -67,7 +67,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:5.23.7'
|
||||
implementation 'com.simplemobiletools:commons:5.23.8'
|
||||
implementation 'com.facebook.stetho:stetho:1.5.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
|
||||
implementation 'com.shawnlin:number-picker:2.4.6'
|
||||
|
|
|
@ -17,6 +17,7 @@ import com.simplemobiletools.commons.extensions.*
|
|||
import com.simplemobiletools.commons.helpers.LICENSE_NUMBER_PICKER
|
||||
import com.simplemobiletools.commons.helpers.LICENSE_RTL
|
||||
import com.simplemobiletools.commons.helpers.LICENSE_STETHO
|
||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||
import com.simplemobiletools.commons.models.FAQItem
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
|
||||
|
@ -34,9 +35,9 @@ class MainActivity : SimpleActivity() {
|
|||
initFragments()
|
||||
|
||||
if (getNextAlarm().isEmpty()) {
|
||||
Thread {
|
||||
ensureBackgroundThread {
|
||||
rescheduleEnabledAlarms()
|
||||
}.start()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue