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

Sorting does not work correctly #376

Open
Ahwxorg opened this issue Dec 4, 2024 · 2 comments
Open

Sorting does not work correctly #376

Ahwxorg opened this issue Dec 4, 2024 · 2 comments

Comments

@Ahwxorg
Copy link

Ahwxorg commented Dec 4, 2024

I use both Element and iamb on my computer, and when I use iamb, the sorting isn't the same. It seems to be random, and not based on time or which chat is unread. Is this normal, and if so, can I change this?

@pcarrin2
Copy link

pcarrin2 commented Dec 6, 2024

Looks like room sorting is defined by a user-configurable setting named settings.tunables.sort.rooms (see https://github.com/ulyssa/iamb/blob/main/src/windows/mod.rs#L543). You can configure it in your profile config.

This setting accepts a list of sorting criteria. A "~" before a criterion reverses the default sorting order. For example, {"sort": {"rooms":["unread", "recent"]}} would (sensibly) put unreads first and then sort by most recent activity. {"sort": {"rooms":["unread", "~recent"]}} would put unreads first and then sort by least recent activity (God knows why you'd want to do this).

The full list of options is defined in this enum: https://github.com/ulyssa/iamb/blob/main/src/base.rs#L225

The default is supposed to be:

  1. whether a room is "favorited"
  2. whether a room is marked "low-priority"
  3. whether there are unreads
  4. sort by room name alphabetically -- not the display name/alias, but the real name of the room

(see https://github.com/ulyssa/iamb/blob/main/src/config.rs#L48)

This is a pretty weird sort order, maybe some of your rooms are favorited/low-priority? Or maybe it isn't being applied properly. Could you give an example of how your client sorts rooms, and whether it matches up with this default?

Please note that I haven't tested any of this, nor am I involved in iamb development, I'm just reading the source.

@Ahwxorg
Copy link
Author

Ahwxorg commented Dec 6, 2024

I think it does sort correctly, but somehow all chats are always unread, even ones I have just read.

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

No branches or pull requests

2 participants