Show groups when searching for contacts.

Currently, if you're searching for a contact to start a conversation
with or send a share to (via the Android sharing system), groups do not
appear. With this change, groups will now appear when searching, located
under their own  heading.

Fixes #7202.
Closes #7577
This commit is contained in:
Greyson Parrelli
2018-03-27 22:13:27 -07:00
committed by Moxie Marlinspike
parent 5dc5503896
commit 18039bc3f4
8 changed files with 182 additions and 58 deletions

View File

@@ -22,6 +22,7 @@ import org.thoughtcrime.securesms.util.Util;
import org.whispersystems.libsignal.util.guava.Optional;
import org.whispersystems.signalservice.api.messages.SignalServiceAttachmentPointer;
import java.io.Closeable;
import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
@@ -304,7 +305,7 @@ public class GroupDatabase extends Database {
}
}
public static class Reader {
public static class Reader implements Closeable {
private final Cursor cursor;
@@ -338,6 +339,7 @@ public class GroupDatabase extends Database {
cursor.getInt(cursor.getColumnIndexOrThrow(MMS)) == 1);
}
@Override
public void close() {
if (this.cursor != null)
this.cursor.close();