use a background thread for inserting the initial regular event type
This commit is contained in:
parent
bb34f8085a
commit
56167f7d1f
1 changed files with 5 additions and 3 deletions
|
@ -108,9 +108,11 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
|||
}
|
||||
|
||||
private fun addRegularEventType(db: SQLiteDatabase) {
|
||||
val regularEvent = context.resources.getString(R.string.regular_event)
|
||||
val eventType = EventType(REGULAR_EVENT_TYPE_ID, regularEvent, context.config.primaryColor)
|
||||
addEventType(eventType, db)
|
||||
Thread {
|
||||
val regularEvent = context.resources.getString(R.string.regular_event)
|
||||
val eventType = EventType(REGULAR_EVENT_TYPE_ID, regularEvent, context.config.primaryColor)
|
||||
addEventType(eventType, db)
|
||||
}.start()
|
||||
}
|
||||
|
||||
fun insert(event: Event, addToCalDAV: Boolean, activity: SimpleActivity? = null, callback: (id: Long) -> Unit) {
|
||||
|
|
Loading…
Reference in a new issue