mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-22 20:18:36 +00:00
Handle keepMutedChatsArchived more generically, also apply it to sends.
Fixes #12788
This commit is contained in:
@@ -113,6 +113,16 @@ fun Cursor.readToSingleInt(defaultValue: Int = 0): Int {
|
||||
}
|
||||
}
|
||||
|
||||
fun Cursor.readToSingleBoolean(defaultValue: Boolean = false): Boolean {
|
||||
return use {
|
||||
if (it.moveToFirst()) {
|
||||
it.getInt(0) != 0
|
||||
} else {
|
||||
defaultValue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@JvmOverloads
|
||||
inline fun <T> Cursor.readToList(predicate: (T) -> Boolean = { true }, mapper: (Cursor) -> T): List<T> {
|
||||
val list = mutableListOf<T>()
|
||||
|
||||
Reference in New Issue
Block a user