aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/services
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-12-15 17:14:27 +0100
committeriNPUTmice <daniel@gultsch.de>2014-12-15 17:14:27 +0100
commit2bd4621245dfcf1a64f68e1c3d1ae82e44cbe4b9 (patch)
treed931512867c368e1463b91ab2003be29ef5fa9aa /src/main/java/eu/siacs/conversations/services
parenta6cfbf2f2d4b8d16db2275505e17873e5df1e3c3 (diff)
fixed history deletion. fixed #780
Diffstat (limited to 'src/main/java/eu/siacs/conversations/services')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index b7ca699c2..ef93dcc79 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -2086,6 +2086,16 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
}
}
+ public void clearConversationHistory(final Conversation conversation) {
+ conversation.clearMessages();
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ databaseBackend.deleteMessagesInConversation(conversation);
+ }
+ }).start();
+ }
+
public interface OnConversationUpdate {
public void onConversationUpdate();
}