From 2a514d0969f5c25d5e2d14421125a47df6b14974 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Fri, 17 Nov 2017 16:06:54 +0100 Subject: Fix unit tests using async + read message marker --- libdino/src/service/counterpart_interaction_manager.vala | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'libdino/src/service') diff --git a/libdino/src/service/counterpart_interaction_manager.vala b/libdino/src/service/counterpart_interaction_manager.vala index 75d2d7be..0b989c35 100644 --- a/libdino/src/service/counterpart_interaction_manager.vala +++ b/libdino/src/service/counterpart_interaction_manager.vala @@ -14,7 +14,6 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object { public signal void received_message_displayed(Account account, Jid jid, Entities.Message message); private StreamInteractor stream_interactor; - private HashMap last_read = new HashMap(Jid.hash_bare_func, Jid.equals_bare_func); private HashMap chat_states = new HashMap(Jid.hash_bare_func, Jid.equals_bare_func); public static void start(StreamInteractor stream_interactor) { @@ -32,10 +31,6 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object { return chat_states[jid]; } - public Entities.Message? get_last_read(Account account, Jid jid) { - return last_read[jid]; - } - private void on_account_added(Account account) { stream_interactor.module_manager.get_module(account, Xep.ChatMarkers.Module.IDENTITY).marker_received.connect( (stream, jid, marker, id) => { on_chat_marker_received(account, new Jid(jid), marker, id); @@ -63,7 +58,6 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object { message.marked = Entities.Message.Marked.RECEIVED; break; case Xep.ChatMarkers.MARKER_DISPLAYED: - last_read[jid] = message; received_message_displayed(account, jid, message); Gee.List messages = stream_interactor.get_module(MessageStorage.IDENTITY).get_messages(conversation); foreach (Entities.Message m in messages) { @@ -85,4 +79,4 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object { on_chat_marker_received(account, jid, Xep.ChatMarkers.MARKER_RECEIVED, id); } } -} \ No newline at end of file +} -- cgit v1.2.3-70-g09d2