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

Names instead of IDs on cover #53

Merged
merged 4 commits into from
Dec 12, 2024

Conversation

ichthyosaurus
Copy link
Contributor

Previously: if a room had no name, the first member's user ID was used as handle on the cover, e.g. @x:matrix.org.
Now: unnamed rooms are shown as a list of their member's display names, e.g. Joe, Jane, and Jim.

The code is annoyingly complex and probably not very efficient, but I didn't find a way around it. It has to access two databases asynchronously and merge the results...

Fixes #52.

@b100dian
Copy link
Contributor

I'll do my best to test and make suggestions in the next days, thanks!

@ichthyosaurus
Copy link
Contributor Author

I recommend going through the four commits one by one, that makes the changes easier to understand. It looks worse than it is ;).

Copy link
Contributor

@b100dian b100dian left a comment

Choose a reason for hiding this comment

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

Looks good, now that I have read the changes commit for commit.

One thing I think we should have in mind from now on is that this javascript code is executed in the webview, so you can actually use Promises and destructuring to make the code a little simpler (adding callbacks was what I did too, so this is not in the scope of this PR).

@b100dian b100dian merged commit 0ac629d into hydrogen-sailfishos:master Dec 12, 2024
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.

Names instead of IDs on cover?
2 participants