Good update
This commit is contained in:
@ -25,5 +25,4 @@ class MainActivity : AppCompatActivity() {
|
||||
navView.setBackgroundColor(resources.getColor(R.color.itemBackground, theme))
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -6,12 +6,13 @@ import fr.sanchezm.attestationsCovid19.data.db.dao.ProfileDao
|
||||
|
||||
class MyDatabase private constructor(private val path: String) {
|
||||
|
||||
private val _profileDao: ProfileDao? = null
|
||||
private val _attestationDao: AttestationDao? = null
|
||||
private var _profileDao: ProfileDao? = null
|
||||
private var _attestationDao: AttestationDao? = null
|
||||
|
||||
fun profileDao() : ProfileDao = _profileDao ?: ProfileDao(path)
|
||||
fun profileDao(): ProfileDao = _profileDao ?: ProfileDao(path).also { _profileDao = it }
|
||||
|
||||
fun attestationDao() : AttestationDao = _attestationDao ?: AttestationDao(path)
|
||||
fun attestationDao(): AttestationDao =
|
||||
_attestationDao ?: AttestationDao(path).also { _attestationDao = it }
|
||||
|
||||
companion object {
|
||||
@Volatile
|
||||
|
@ -1,7 +1,7 @@
|
||||
package fr.sanchezm.attestationsCovid19.utilities
|
||||
|
||||
open class Event<out T>(private val content: T) {
|
||||
var hasBeenHandled = false
|
||||
private var hasBeenHandled = false
|
||||
private set
|
||||
|
||||
fun getContentIfNotHandled(): T? {
|
||||
|
Reference in New Issue
Block a user