element-hq / element-x-ios

Next generation Matrix client for iOS built with SwiftUI on top of matrix-rust-sdk.
https://element.io/labs/element-x
GNU Affero General Public License v3.0
423 stars 100 forks source link

Room previews don't show local echo. #3166

Open ara4n opened 2 months ago

ara4n commented 2 months ago

Steps to reproduce

  1. Use SSS, and send a message in a room
  2. Go back to the roomlist
  3. See a stale room preview
  4. A few seconds it updates as the remote echo arrives for the message in question.

Outcome

What did you expect?

Room previews should show local echo, in order for the app to feel fast.

This is effectively a regression of https://github.com/element-hq/element-x-ios/issues/1294

It's also entangled with https://github.com/element-hq/element-x-ios/issues/1775

Your phone model

No response

Operating system version

No response

Application version

679

Homeserver

matrix.org

Will you send logs?

No

Hywan commented 2 months ago

This isn't related to SSS. It has never worked. The SDK knows the latest event has been updated but the update information isn't propagated to the app. Maybe it can come back with https://github.com/matrix-org/matrix-rust-sdk/issues/3802.

ara4n commented 2 months ago

huh, i thought you fixed it in https://github.com/element-hq/element-x-ios/issues/1294?

Hywan commented 2 months ago

The app doesn't call Room::latest_event when it's updated. That's the only problem. Let me coordinate with @stefanceriu.

ara4n commented 2 months ago

@stefanceriu it sounds like this is intended to work (and also causes the badge state to lag and the app to feel unresponsive). while not a showstopper it does make the app feel laggy for sure. can we do something?

stefanceriu commented 2 months ago

@Hywan and I talked about it starting here https://matrix.to/#/!kCCQTCfnABLKGGvQjo:matrix.org/$MfKhgm86vY-yjh8VjrdxI3BvTkMHboN2yzVbKxYxSKc?via=matrix.org&via=element.io&via=one.ems.host

The TL;DR; is that the APIs we have at our disposal at the moment aren't enough to fix this (the RoomListService isn't aware of Timeline changes) and that the EventCache might be the right place to tackle this in as a higher level API. We also need to finall switch to using pure DTOs for passing room list data over to the apps.