diff options
author | fiaxh <git@mx.ax.lt> | 2017-11-17 16:06:54 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-11-17 17:24:03 +0100 |
commit | 2a514d0969f5c25d5e2d14421125a47df6b14974 (patch) | |
tree | fd95c1ee569b2e30dd3c7311b6fa32c7e46a50d0 /libdino/src/service | |
parent | 48cd057bd569efdaf8f8a759365fa9079b732159 (diff) | |
download | dino-2a514d0969f5c25d5e2d14421125a47df6b14974.tar.gz dino-2a514d0969f5c25d5e2d14421125a47df6b14974.zip |
Fix unit tests using async + read message marker
Diffstat (limited to 'libdino/src/service')
-rw-r--r-- | libdino/src/service/counterpart_interaction_manager.vala | 8 |
1 files changed, 1 insertions, 7 deletions
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<Jid, Entities.Message> last_read = new HashMap<Jid, Entities.Message>(Jid.hash_bare_func, Jid.equals_bare_func); private HashMap<Jid, string> chat_states = new HashMap<Jid, string>(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<Entities.Message> 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 +} |