Short-circuit query if list is empty.
This commit is contained in:
parent
452d5960e4
commit
cc98eced27
1 changed files with 4 additions and 0 deletions
|
@ -1248,6 +1248,10 @@ class ThreadTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTa
|
|||
}
|
||||
|
||||
fun getRecipientIdsForThreadIds(threadIds: Collection<Long>): List<RecipientId> {
|
||||
if (threadIds.isEmpty()) {
|
||||
return emptyList()
|
||||
}
|
||||
|
||||
val query = SqlUtil.buildSingleCollectionQuery(ID, threadIds)
|
||||
|
||||
return readableDatabase
|
||||
|
|
Loading…
Add table
Reference in a new issue