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

RoomListItem.roomInfo().displayName() often null #4051

Open
ganfra opened this issue Sep 30, 2024 · 1 comment
Open

RoomListItem.roomInfo().displayName() often null #4051

ganfra opened this issue Sep 30, 2024 · 1 comment

Comments

@ganfra
Copy link
Contributor

ganfra commented Sep 30, 2024

When building the room summaries, we got a lot of RoomListItem.roomInfo().displayName() being null.
Then after some time, they get updated, but only in memory.
Indeed, when launching the app in airplane mode, we got null values again for most of the rooms, even if the app had all the names before killing the app.

I've checked the code, and the persistence to disk is only made during a next sync in the room only if there is new event in the room. So if you never get updates for a room, his display name will never be saved to disk.

It'd be great to have the displayName computed synchronously and not async, so we don't get null display name while we have avatar, and so it'd be saved to disk directly.

@bnjbvr
Copy link
Member

bnjbvr commented Sep 30, 2024

Thanks for opening an issue, good catch. Computing the displayName synchronously would require a deep overhaul of the compute-room-name logic, which relies on events stored in the database at the moment; we should likely make it more generic and rely on database-or-sync, and save it immediately (even if the computing is async).

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

No branches or pull requests

2 participants