You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Removed direct static usages of database from app
This commit is contained in:
@@ -14,8 +14,8 @@ class SettingsDao : BaseDao() {
|
||||
values(key to value.toString())
|
||||
}.ignoreElement()
|
||||
|
||||
fun fetch(key: String) = query<Select> {
|
||||
fun fetch(key: String, default: Int = -1) = query<Select> {
|
||||
condition { equals("key", key) }
|
||||
}.map { it.first().values.first().toIntOrNull() ?: -1 }
|
||||
}.map { it.firstOrNull()?.values?.firstOrNull()?.toIntOrNull() ?: default }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user