Skip to content

WIP: Sort room list by date #416

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

henri2h
Copy link

@henri2h henri2h commented Mar 2, 2025

When filtering rooms and after reseting the filter, sort rooms according to the timestamp of the last m.room.message event.

@henri2h
Copy link
Author

henri2h commented Mar 2, 2025

Formatting went wrong, are you using a custom configuration for cargo fmt?

@aaravlu
Copy link
Contributor

aaravlu commented Mar 3, 2025

Formatting went wrong, are you using a custom configuration for cargo fmt?

Thanks for your contributing!

Currently, no any format is enabled, please change your editor setting like this(i use zed):

"format_on_save": "off"

@tyreseluo
Copy link
Contributor

tyreseluo commented Mar 3, 2025

hi!@henri2h Thank you for your contribution, as we don't have a unified fixed version of format at the moment, it may cause local format formatting, please ignore these changes and commit again.

@kevinaboos
Copy link
Member

When filtering rooms and after reseting the filter, sort rooms according to the timestamp of the last m.room.message event.

Thanks @henri2h! Sorting by recency is a good feature to add, but it should be done based on the server-provided recency timestamp, not based on the timestamp of the latest message event (which may not always exist). Native/simplified sliding sync already offers a recency-based filter (it might even be the default), so we should use that instead.

Regarding formatting, we have not yet set that up because I generally dislike auto-formatters. We'll set it up soon now that the project is gaining traction & contributors, but for now, kindly disable your editor's auto-formatter.

@henri2h
Copy link
Author

henri2h commented Mar 3, 2025

thanks for the reply, I removed the auto formatting.
Indeed, the sliding sync mechanism provide a way to maintain a sorted room list. Currently modifying my pull request to exploit it instead of filtering the room manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants