Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

Commit 41c025d

Browse files
kunall17niftynei
authored andcommitted
Get All users from the database
1 parent 33575a7 commit 41c025d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/src/main/java/com/zulip/android/models/Person.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ public static Person getById(ZulipApp app, int id) {
206206
return dao.queryForId(id);
207207
}
208208

209+
public static List<Person> getAllPeople(ZulipApp app) throws SQLException {
210+
RuntimeExceptionDao<Person, Object> dao = app.getDao(Person.class);
211+
return dao.queryBuilder().where().eq(Person.ISBOT_FIELD, false).query();
212+
}
213+
209214
public static void sortByPresence(ZulipApp app, List<Person> people) {
210215
final Map<String, Presence> presenceCopy = new HashMap<>(
211216
app.presences);

0 commit comments

Comments
 (0)