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

refactor: Make getDisplayname and calcAvatar of room async #1647

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

krille-chan
Copy link
Contributor

This makes it possible to
load users lazy
for rooms to calculate the
name and the avatar. The
changes explain the new
behavior in detail in the
dart docs. The old
avatar getter now only
returns the avatar from the
room state m.room.avatar.

@krille-chan krille-chan force-pushed the krille/lazy-load-users-for-avatar-displayname branch 2 times, most recently from fef3a82 to 34f0c22 Compare December 12, 2023 08:56
Copy link
Member

@nico-famedly nico-famedly left a comment

Choose a reason for hiding this comment

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

Hm, I have some thoughts for this. I do think it is something we should improve, but I would have done it differently! :D

lib/src/room.dart Outdated Show resolved Hide resolved
lib/src/room.dart Outdated Show resolved Hide resolved
lib/src/room.dart Outdated Show resolved Hide resolved
@krille-chan krille-chan force-pushed the krille/lazy-load-users-for-avatar-displayname branch from 34f0c22 to 0afb7d7 Compare December 13, 2023 13:28
This makes it possible to await loading the
hero users to correctly
calculate displayname and
avatar.
@krille-chan krille-chan force-pushed the krille/lazy-load-users-for-avatar-displayname branch from 0afb7d7 to 9dc2f82 Compare December 14, 2023 08:16
@krille-chan krille-chan merged commit d8deaf8 into main Dec 14, 2023
9 checks passed
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.

2 participants