Skip to content

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 <[email protected]>
@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
@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

4 participants