From 27c9c0aa21e3ec1a5801f6c3279caf0cd4fe9248 Mon Sep 17 00:00:00 2001 From: steckbrief Date: Thu, 10 Mar 2016 22:54:13 +0100 Subject: Fixes FS#157: Trigger loading messages from MAM in MUC does not end --- .../ui/listeners/ConversationSwipeRefreshListener.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/main/java/de/thedevstack/conversationsplus/ui') diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/listeners/ConversationSwipeRefreshListener.java b/src/main/java/de/thedevstack/conversationsplus/ui/listeners/ConversationSwipeRefreshListener.java index 5076da28..dede54ca 100644 --- a/src/main/java/de/thedevstack/conversationsplus/ui/listeners/ConversationSwipeRefreshListener.java +++ b/src/main/java/de/thedevstack/conversationsplus/ui/listeners/ConversationSwipeRefreshListener.java @@ -52,10 +52,9 @@ public class ConversationSwipeRefreshListener implements SwipyRefreshLayout.OnRe long lastSessionEstablished = this.getTimestampOfLastSessionEstablished(activity.getSelectedConversation()); long lastReceivedMessage = this.getTimestampOfLastReceivedOrTransmittedMessage(); long startTimestamp = Math.min(lastSessionEstablished, lastReceivedMessage); - MessageArchiveService.Query query = activity.xmppConnectionService.getMessageArchiveService().query(activity.getSelectedConversation(), startTimestamp, System.currentTimeMillis()); + MessageArchiveService.Query query = activity.xmppConnectionService.getMessageArchiveService().query(activity.getSelectedConversation(), startTimestamp, System.currentTimeMillis(), this.listener); if (query != null) { this.listener.setLoadHistory(false); - query.setCallback(this.listener); } else { Logging.d("mam", "no query built - no messages loaded"); this.listener.onMoreMessagesLoaded(0, activity.getSelectedConversation()); -- cgit v1.2.3