diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-04-30 23:51:01 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-04-30 23:51:01 +0200 |
commit | bae77ff8fe587e981caa44ba27f5371b7a6664f6 (patch) | |
tree | e96fda7b564e18bc28bf04a5b4debf4c17e01113 /src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java | |
parent | ce2ba629bd91897f74e2d1dee38f90671b0f28f8 (diff) |
properly cancel pending searchs and scroll to bottom after refresh
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java b/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java index d55f36bdf..b407de339 100644 --- a/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java +++ b/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java @@ -719,7 +719,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { public Cursor getMessageSearchCursor(String term) { SQLiteDatabase db = this.getReadableDatabase(); - String SQL = "SELECT " + Message.TABLENAME + ".*," + Conversation.TABLENAME + '.' + Conversation.CONTACTJID + ',' + Conversation.TABLENAME + '.' + Conversation.ACCOUNT + ',' + Conversation.TABLENAME + '.' + Conversation.MODE + " FROM " + Message.TABLENAME + " join " + Conversation.TABLENAME + " on " + Message.TABLENAME + '.' + Message.CONVERSATION + '=' + Conversation.TABLENAME + '.' + Conversation.UUID + " where " + Message.BODY + " LIKE ? limit 200"; + String SQL = "SELECT " + Message.TABLENAME + ".*," + Conversation.TABLENAME + '.' + Conversation.CONTACTJID + ',' + Conversation.TABLENAME + '.' + Conversation.ACCOUNT + ',' + Conversation.TABLENAME + '.' + Conversation.MODE + " FROM " + Message.TABLENAME + " join " + Conversation.TABLENAME + " on " + Message.TABLENAME + '.' + Message.CONVERSATION + '=' + Conversation.TABLENAME + '.' + Conversation.UUID + " where " + Message.ENCRYPTION + " NOT IN(" + Message.ENCRYPTION_AXOLOTL_NOT_FOR_THIS_DEVICE + ',' + Message.ENCRYPTION_PGP + ',' + Message.ENCRYPTION_DECRYPTION_FAILED + ") AND " + Message.BODY + " LIKE ? ORDER BY " + Message.TIME_SENT + " DESC limit " + Config.MAX_SEARCH_RESULTS; return db.rawQuery(SQL, new String[]{'%' + term + '%'}); } |