diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/persistance')
-rw-r--r-- | src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java b/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java index 62b15c816..94710b86e 100644 --- a/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java +++ b/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java @@ -917,6 +917,17 @@ public class DatabaseBackend extends SQLiteOpenHelper { Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": persisted roster in " + duration + "ms"); } + public void deleteMessageInConversation(Message message) { + long start = SystemClock.elapsedRealtime(); + final SQLiteDatabase db = this.getWritableDatabase(); + db.beginTransaction(); + String[] args = {message.getUuid()}; + db.delete("messages_index", "uuid =?", args); + db.setTransactionSuccessful(); + db.endTransaction(); + Log.d(Config.LOGTAG, "deleted single message in " + (SystemClock.elapsedRealtime() - start) + "ms"); + } + public void deleteMessagesInConversation(Conversation conversation) { long start = SystemClock.elapsedRealtime(); final SQLiteDatabase db = this.getWritableDatabase(); |