mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-06-05 22:19:17 +02:00
using a helper function for ensuring background thread
This commit is contained in:
@ -67,7 +67,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.23.7'
|
implementation 'com.simplemobiletools:commons:5.23.8'
|
||||||
implementation 'com.facebook.stetho:stetho:1.5.0'
|
implementation 'com.facebook.stetho:stetho:1.5.0'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
|
||||||
implementation 'com.shawnlin:number-picker:2.4.6'
|
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_NUMBER_PICKER
|
||||||
import com.simplemobiletools.commons.helpers.LICENSE_RTL
|
import com.simplemobiletools.commons.helpers.LICENSE_RTL
|
||||||
import com.simplemobiletools.commons.helpers.LICENSE_STETHO
|
import com.simplemobiletools.commons.helpers.LICENSE_STETHO
|
||||||
|
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||||
import com.simplemobiletools.commons.models.FAQItem
|
import com.simplemobiletools.commons.models.FAQItem
|
||||||
import kotlinx.android.synthetic.main.activity_main.*
|
import kotlinx.android.synthetic.main.activity_main.*
|
||||||
|
|
||||||
@ -34,9 +35,9 @@ class MainActivity : SimpleActivity() {
|
|||||||
initFragments()
|
initFragments()
|
||||||
|
|
||||||
if (getNextAlarm().isEmpty()) {
|
if (getNextAlarm().isEmpty()) {
|
||||||
Thread {
|
ensureBackgroundThread {
|
||||||
rescheduleEnabledAlarms()
|
rescheduleEnabledAlarms()
|
||||||
}.start()
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user