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

feat(contactsmenu): Sort by user status #41266

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

ChristophWurst
Copy link
Member

@ChristophWurst ChristophWurst commented Nov 3, 2023

Summary

List system contacts with a recent custom status message first sorted descending by the status change time, then all other contacts sorted ascending by their name.

If user_status is not enabled or nobody set their custom status recently, fall back to sorting by contact name ascending only.

TODO

  • Make it work
  • Fix usage of \OCP\Contacts\ContactsMenu\IContactsStore::getContacts with pagination Not used anyway. API now falls back to old behavior if offset is supplied.

image

(avatars are only broken because automated tests deleted them …)

Follow-up

  • Make it fast

Checklist

@ChristophWurst ChristophWurst added the 2. developing Work in progress label Nov 3, 2023
@ChristophWurst ChristophWurst self-assigned this Nov 3, 2023
@ChristophWurst ChristophWurst added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Nov 8, 2023
@ChristophWurst ChristophWurst marked this pull request as ready for review November 8, 2023 17:17
@miaulalala
Copy link
Contributor

Something's weird with the name resolution:

image

This is supposed to be "Anna Admin"

@miaulalala
Copy link
Contributor

Otherwise it looks good:

image

@ChristophWurst
Copy link
Member Author

This is supposed to be "Anna Admin"

Fixed. It's a remote user overlapping with a local UID.

Copy link
Contributor

@miaulalala miaulalala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it, works great!

@ChristophWurst ChristophWurst force-pushed the feat/contactsmenu/user-status-sorting branch from ab9bbe2 to 13685e6 Compare November 8, 2023 18:50
@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Nov 8, 2023
If user_status is not enabled, fall back to sorting by contact name.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst ChristophWurst force-pushed the feat/contactsmenu/user-status-sorting branch from 13685e6 to 71080a8 Compare November 8, 2023 20:53
@ChristophWurst ChristophWurst merged commit 734b11d into master Nov 8, 2023
49 checks passed
@ChristophWurst ChristophWurst deleted the feat/contactsmenu/user-status-sorting branch November 8, 2023 21:21
@blizzz blizzz mentioned this pull request Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement feature: contacts menu
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show status instead of email in contacts/people menu
3 participants