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

Commit 5b3032e

Browse files
Sam1301timabbott
authored andcommitted
Use SelectArgs to compare strings.
1 parent 289f7ab commit 5b3032e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/src/main/java/com/zulip/android/ZulipApp.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.j256.ormlite.dao.ReferenceObjectCache;
2525
import com.j256.ormlite.dao.RuntimeExceptionDao;
2626
import com.j256.ormlite.misc.TransactionManager;
27+
import com.j256.ormlite.stmt.SelectArg;
2728
import com.zulip.android.activities.ZulipActivity;
2829
import com.zulip.android.database.DatabaseHelper;
2930
import com.zulip.android.models.Emoji;
@@ -274,7 +275,9 @@ public UserConfigurationResponse read(JsonReader in) throws IOException {
274275
Person currentPerson = res.getRealmUsers().get(i);
275276
Person foundPerson = null;
276277
try {
277-
foundPerson = personDao.queryBuilder().where().eq(Person.EMAIL_FIELD, currentPerson.getEmail()).queryForFirst();
278+
foundPerson = personDao.queryBuilder().where().eq(Person.EMAIL_FIELD,
279+
new SelectArg(Person.EMAIL_FIELD, currentPerson.getEmail()))
280+
.queryForFirst();
278281
if(foundPerson != null) {
279282
currentPerson.setId(foundPerson.getId());
280283
}

0 commit comments

Comments
 (0)