-
Notifications
You must be signed in to change notification settings - Fork 8
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? #52
Comments
Hi, and sorry for the slow reply. The communication between the hydrogen-web app and the native application is, as you've observed, a polling script that watches for changes in the IndexedDB.. This is set to 5 seconds because we found out that there's some locking when accessing the database that somehow races with login at times ;-S I am not sure how to get many details from the database, as I may not have the context to do that as I had one year ago, and that solution was a hackathon-style one. The correct solution for the notification polling would be to implement the notification API in sailfishos-webview (which I've tried a bit in this year's hackathon, and plan to continue). For displaying the unread labels, the correct solution would probably be to build our on web app based on the Hydrogen SDK https://github.com/element-hq/hydrogen-web/blob/master/doc/SDK.md#tutorial (I hope). However, given that you want a more detailed answer sooner, it might be interesting if you would deepen the IndexedDB knowledge we have on current hydrogen-web version.
|
For example, given a "hero" |
Thank you @b100dian, that put me on the right track! Implementing took me way longer than I anticipated but at least it works now ;). |
When I updated the cover, I added this line: https://github.com/hydrogen-sailfishos/harbour-hydrogen/blob/a218183fa992c1930277714840555424c0ec174e/qml/notificationCount.js#L45C1-L45C55
It takes the room name from the room summary, or the first "hero" if there is no room name to show the number of unread messages per room.
However, "heroes" seems to be an array of IDs (
@something
) instead of display names.I dug through the hydrogen code base and found relevant parts:
I'm at a loss how we can translate the handle into a display name. Any ideas or pointers?
The text was updated successfully, but these errors were encountered: