mirror of
https://github.com/binwiederhier/ntfy-android.git
synced 2024-06-03 19:24:36 +12:00
22 lines
595 B
Kotlin
22 lines
595 B
Kotlin
package io.heckel.ntfy.app
|
|
|
|
import android.app.Application
|
|
import android.content.Context
|
|
import io.heckel.ntfy.db.Database
|
|
import io.heckel.ntfy.db.Repository
|
|
import io.heckel.ntfy.util.Log
|
|
|
|
class Application : Application() {
|
|
private val database by lazy {
|
|
Log.init(this) // What a hack, but this is super early and used everywhere
|
|
Database.getInstance(this)
|
|
}
|
|
val repository by lazy {
|
|
val repository = Repository.getInstance(applicationContext)
|
|
if (repository.getRecordLogs()) {
|
|
Log.setRecord(true)
|
|
}
|
|
repository
|
|
}
|
|
}
|