Private
Public Access
1
0

Implement resync after update monitor reconnect

This commit is contained in:
2025-06-13 17:13:04 -07:00
parent 1420d96a20
commit 741932c67d
6 changed files with 53 additions and 6 deletions

View File

@@ -34,7 +34,15 @@ public class MessageListModel : Object, ListModel
public void watch_updates() {
if (this.handler_id == 0) {
this.handler_id = Repository.get_instance().messages_updated.connect(got_messages_updated);
weak MessageListModel self = this;
this.handler_id = Repository.get_instance().messages_updated.connect((conversation_guid) => {
self.got_messages_updated(conversation_guid);
});
this.handler_id = Repository.get_instance().reconnected.connect(() => {
// On reconnect, reload the messages that we're looking at now.
self.load_messages();
});
}
}