Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Room list ordering isn't always stable #66

Closed
bwindels opened this issue Aug 27, 2020 · 5 comments
Closed

Room list ordering isn't always stable #66

bwindels opened this issue Aug 27, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@bwindels
Copy link
Contributor

bwindels commented Aug 27, 2020

Sometimes when you close a room/go to another one that was unread, the room you left goes all the way to the bottom or somewhere close.

One reason could be that the properties of the room have changed without causing a rerendering somehow, so what you see isn't what is being sorted anymore. Unsure how that could happen though.

Another reason could be that lastMessageTimestamp ends up something else than null or a number (e.g. undefined).

@bwindels bwindels added the bug Something isn't working label Aug 27, 2020
@bwindels
Copy link
Contributor Author

Interesting, I was able to reproduce the problem on 0.0.33 with logging captured and the room that become unread didn't show up in the sorting log after going to another one... bug in sorter or observable collections?

@bwindels
Copy link
Contributor Author

bwindels commented Aug 27, 2020

I think the this.emitChange("isOpen") in RoomTileViewModel.close is somehow not triggering a resort, so the list is not in sorting order anymore, messing things open?

I stepped through that code path though and it did trigger a resort...

@bwindels
Copy link
Contributor Author

I think the this.emitChange("isOpen") in RoomTileViewModel.close is somehow not triggering a resort,

It's not this, the resort logs appear above "close timeline for room x"

@bwindels
Copy link
Contributor Author

The problem seems to be indeed a timestamp being undefined. The above PR fixes that but we'll need further testing to see if this actually solves it. Also, we need to figure out why the timestamp is undefined. Did origin_server_ts end up on unsigned perhaps?

@bwindels
Copy link
Contributor Author

This seems fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant