Add unread count to the room unread indicator#6887
Conversation
|
Thank you for your contribution! Here are a few things to check in the PR to ensure it's reviewed as quickly as possible:
|
|
I'm not the reviewer of this PR, but I don't think we want to include this change at the moment: With the sync logic used in Element Android classic, you loaded everything that was pending since the last time you synced, and that was quite slow, but it resulted in accurate up to date data. In Element X on the other hand, we have sliding sync, that only returns the latest N events in a room depending on how it's set up (events, not messages), which is way faster... but can be problematic if we want to display accurate values like the unread count. So it could be easy that you see a room with maybe We're working on back paginating the rooms in background to make the unread counts more accurate, but that's not ready yet. By the way, if you wanted to display a number in the indicators you can't just use |
bmarty
left a comment
There was a problem hiding this comment.
Thanks. As you said, this change will require a product decision.
CC @mxandreas
|
@jmartinesp I agree with you, this change felt "good enough" but of course it would not work correctly ATM, it seems like we can just set it behind a feature flag for now? |
|
As the person who reported this issue, I think you should enable the unread count even if it's not 100% accurate. It would still be very useful and would solve most of the problem for us. We can always improve the accuracy later. |
bmarty
left a comment
There was a problem hiding this comment.
Thanks for the update! I guess it's OK now with the feature flag.
| .background(if (isVisible) color else Color.Transparent), | ||
| contentAlignment = Alignment.Center, | ||
| ) { | ||
| if (count != null && count > 1) { |
There was a problem hiding this comment.
That's up to product/design decision, but IMO, to make it less noisy, I think having the indicator without a number would make it clear that there's only one unread message, otherwise there will be a lot of numbers in the room list.
But if this is not wanted, we can make it count > 0 instead.
|
I'm just a user, not a developer. Can you share an APK for Samsung A55 with this feature enabled temporarily, so I can use it until the full fix is ready? |
|
@sasan7071-maker this kind of behavior (duplicating issues, flooding PRs with unrelated comments) is not very appropriate and may result in you being blocked from engaging in this repo. If you need customer support and want your issues to be prioritized, please buy the Element Enterprise solution to get proper support for your problems in the app. I'm just a volunteer doing this work for free. The APK build is here, you would need to enable the feature flag in the developer options (tap 7 times on the app version) afterwards. |
|
I have downloaded and used this, and it worked very well — very useful. |
|
I downloaded the APK build is here. it worked very well — very useful. |
|
Indeed the eventual goal is to show the number of messages (so it is also compatible with Web) however, we have postponed this until we get a reliable number. The work to build the foundation for getting a reliable number is currently in progress. |
Content
Add unread count to the room unread indicator in the room list.
The indicator will expand a bit depending on the number of characters. If the count is more than 99, "99+" will be shown instead.
Motivation and context
Fixes #6867 and the duplicate issues of it
Feature parity with Element Classic and it has been frequently requested.
Screenshots / GIFs
Tests
Tested devices
Checklist