mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 16:49:40 +01:00
@@ -1684,6 +1684,13 @@ open class RecipientTable(context: Context, databaseHelper: SignalDatabase) : Da
|
||||
return updated
|
||||
}
|
||||
|
||||
fun containsId(id: RecipientId): Boolean {
|
||||
return readableDatabase
|
||||
.exists(TABLE_NAME)
|
||||
.where("$ID = ?", id.serialize())
|
||||
.run()
|
||||
}
|
||||
|
||||
fun setReportingToken(id: RecipientId, reportingToken: ByteArray) {
|
||||
val values = ContentValues(1).apply {
|
||||
put(REPORTING_TOKEN, reportingToken)
|
||||
|
||||
@@ -637,6 +637,13 @@ class ThreadTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTa
|
||||
}
|
||||
}
|
||||
|
||||
fun containsId(threadId: Long): Boolean {
|
||||
return readableDatabase
|
||||
.exists(TABLE_NAME)
|
||||
.where("$ID = ?", threadId)
|
||||
.run()
|
||||
}
|
||||
|
||||
fun getFilteredConversationList(filter: List<RecipientId>, unreadOnly: Boolean): Cursor? {
|
||||
if (filter.isEmpty()) {
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user