Skip to content

Refactor QML singletons

Ruben De Smet requested to merge refactor-qml-singletons into master

Get rid of the SessionModel and MessageModel singletons, replacing them by modular QML-exposed types that can be constructed and destroyed at-will. This essentially is a try-out of #183 (comment 1222984420).

Big progress towards #183 Fixes #105 (closed)

Due to this refactoring, multiple UI updates that were previously pushed through signals, should now have been pushed through properties and models. These should all be tested to be still working.

  • Session list gets an update when a message is received
  • Message view is updated when visible and when a message is received
  • [ ] Reaction gets displayed when it is received (#507 (closed))
  • Checkmarks appear in the message view, and now also in the session view (fixes some issue?)
  • [ ] Failure marks appear in the message view, and now also in the session view (fixes another issue?) (#508)
  • [ ] Test whether the share plugin still shows everything (#508)

TODO:

  • Group members should become a model; test whether they are indeed updated, visible, ...
  • [ ] Clean up the "VisualSessionModel" for archive/bookmark (#509 (closed))
  • VerifyIdentity.qml probably can do with fewer parameters, now that it's sessionId-based
  • [ ] Simplify AugmentedMessage: (#510 (closed))
    • Get rid of QtAugmentedMessage, let QML do the querying instead
    • [ ] Stop fetching all attachments in AugmentedMessage, only fetch attachment count (ensure that the triggers are still in place) (#510 (closed))
    • [ ] Stop fetching quoted messages (#510 (closed))
  • [ ] Consider merging define_model_roles! and the observing_model! macros meh.
  • Wtf was detail attachments vs visual attachments about?
  • [ ] Get rid of Session::source and Session::message properties. Name them better, or replace them with something better. (#511 (closed))
  • [ ] Base endSession on recipientId instead of e164 (#512)
  • [ ] Reimplement fingerprint (#513)
  • Attachments in quotes
  • [ ] profilePicture should be generated in the conversation page, and should not depend on the sessiondelegate (#514 (closed))
  • [ ] [W] unknown:95 - file:///usr/share/harbour-whisperfish/qml/pages/MainPage.qml:95:26: Unable to assign [undefined] to bool (#508)
  • active_model: When the app gets a storage assigned, it should trigger reinit.

Models to create:

  • Attachment loading should be a separate model, instantiable through QML
  • Reactions should be a separate model
  • Single Message for quotes
  • [ ] Typing notifications (#515 (closed))
Edited by Ruben De Smet

Merge request reports