From e2ff51db08922a797c5a6f05c09550b37db398e2 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 25 Apr 2018 19:32:43 +0200 Subject: [PATCH] add debug output to how many messages were deleted --- .../eu/siacs/conversations/persistance/DatabaseBackend.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java index 1a169166f..99523e9e8 100644 --- a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java @@ -872,9 +872,10 @@ public class DatabaseBackend extends SQLiteOpenHelper { } public void deleteMessagesInConversation(Conversation conversation) { - SQLiteDatabase db = this.getWritableDatabase(); + final SQLiteDatabase db = this.getWritableDatabase(); String[] args = {conversation.getUuid()}; - db.delete(Message.TABLENAME, Message.CONVERSATION + "=?", args); + int num = db.delete(Message.TABLENAME, Message.CONVERSATION + "=?", args); + Log.d(Config.LOGTAG,"deleted "+num+" messages for "+conversation.getJid().asBareJid()); } public boolean expireOldMessages(long timestamp) {