Skip to content

Fix People and Photo views to update when invitations are received

Michael Hollister requested to merge michael/bugfix-119-view-updates into main

Fixes:

  • #119 (closed) * Photo gallery not updating after new message is posted

I've not looked in depth to understand why SwiftUI has issues updating the view when an observed object's child properties are changed (e.g. container.session.xxx), but directly using the matrix session reference matrix instead of indirectly through other observable objects seems to work. Note that none of views in the Timeline directory have been updated to this pattern as I've not noticed any issues from that code from the testing so far, but it might be of interest to review/update the code to using the environment object matrix session if necessary in the future.

Notes mentioned on the issue (below) will be resolved/investigated at a later time

Additionally on iPad devices, after accepting/rejecting all invitations on an invitation view, we are left on an empty details view screen (iOS correctly goes back to the master view). I'll if its possible/easy to implement programmatic navigation to the previous view.

I'll also investigate/attempt to remove the view update hacks and fix the relevant ObservableObjects to ensure views are updated when the relevant published properties change.

Edited by Michael Hollister

Merge request reports