mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Only count active threads when determining possible communication.
This commit is contained in:
@@ -1241,6 +1241,13 @@ class ThreadTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTa
|
||||
return getThreadIdIfExistsFor(recipientId) > -1
|
||||
}
|
||||
|
||||
fun hasActiveThread(recipientId: RecipientId): Boolean {
|
||||
return readableDatabase
|
||||
.exists(TABLE_NAME)
|
||||
.where("$RECIPIENT_ID = ? AND $ACTIVE = 1", recipientId)
|
||||
.run()
|
||||
}
|
||||
|
||||
fun updateLastSeenAndMarkSentAndLastScrolledSilenty(threadId: Long) {
|
||||
writableDatabase
|
||||
.update(TABLE_NAME)
|
||||
|
||||
Reference in New Issue
Block a user