mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-25 12:17:22 +00:00
Add remote megaphone.
This commit is contained in:
committed by
Alex Hart
parent
820277800b
commit
bb963f9210
@@ -55,4 +55,14 @@ fun Cursor.isNull(column: String): Boolean {
|
||||
return CursorUtil.isNull(this, column)
|
||||
}
|
||||
|
||||
inline fun <T> Cursor.readToList(mapper: (Cursor) -> T): List<T> {
|
||||
val list = mutableListOf<T>()
|
||||
use {
|
||||
while (moveToNext()) {
|
||||
list += mapper(this)
|
||||
}
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
fun Boolean.toInt(): Int = if (this) 1 else 0
|
||||
|
||||
Reference in New Issue
Block a user