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

Use dark mode avatars when dark mode is used. #941

Closed
nickvergessen opened this issue Oct 21, 2022 · 8 comments · Fixed by #945
Closed

Use dark mode avatars when dark mode is used. #941

nickvergessen opened this issue Oct 21, 2022 · 8 comments · Fixed by #945
Assignees

Comments

@nickvergessen
Copy link
Member

Android ref nextcloud/talk-android#2409

So when darkmode is on, you should load the avatar with /dark appended to the URL:
https://github.com/nextcloud/server/pull/33752/files#diff-4498c88983ae18872bd47b365d72a3604d1850596ea052d36da8bb7ad28f207eR48

@SystemKeeper
Copy link
Collaborator

Currently the avatars are cached by the lib, need to make sure we invalidate the cache if the appearance changes

@nickvergessen
Copy link
Member Author

or use 2 different cache keys. $userId and $userId/dark since / can not appear in user ids

@SystemKeeper
Copy link
Collaborator

Yes, I’ll take a look. Might not be a problem afterall, because the url is the key 🧐

@Ivansss
Copy link
Member

Ivansss commented Oct 21, 2022

Since the urls are different there should not be an issue with the cache.
But we might need to refresh (e.g. RoomsTablewView) if there is an appearce change.

@SystemKeeper
Copy link
Collaborator

I don't see a capability or a backport - so we check for NC 25 when doing this?

@Ivansss
Copy link
Member

Ivansss commented Oct 21, 2022

so we check for NC 25 when doing this?

Right! What would be the best way to proceed here @nickvergessen ?
I guess that's the only possible check we can do at the moment, right?

@nickvergessen
Copy link
Member Author

Yeah, it's a server thing and server people are not used to capabilities (yet).
So yeah can you check the server version?

@SystemKeeper
Copy link
Collaborator

Yep, we store the server version already, so that should be pretty easy to do 👍

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

Successfully merging a pull request may close this issue.

3 participants