kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix crash when searching groups for a large number of members.
rodzic
d0c737779a
commit
f551a700fe
|
@ -299,6 +299,11 @@ public class GroupDatabase extends Database {
|
|||
return new Reader(null);
|
||||
}
|
||||
|
||||
if (recipientIds.size() > 30) {
|
||||
Log.w(TAG, "[queryGroupsByMembership] Large set of recipientIds (" + recipientIds.size() + ")! Using the first 30.");
|
||||
recipientIds = recipientIds.stream().limit(30).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
List<String> recipientLikeClauses = recipientIds.stream()
|
||||
.map(RecipientId::toLong)
|
||||
.map(id -> "(" + MEMBERS + " LIKE " + id + " || ',%' OR " + MEMBERS + " LIKE '%,' || " + id + " || ',%' OR " + MEMBERS + " LIKE '%,' || " + id + ")")
|
||||
|
|
Ładowanie…
Reference in New Issue