-
Notifications
You must be signed in to change notification settings - Fork 465
feat: emit amount of unread messages to display the badge in Talk Desktop #14668
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
Conversation
The main colleagues are currently out a bit. Hopefully they are able to give feedback towards the end of the week |
A couple of things to mention:
|
@Antreesy I understand your point, but unaware of your replacement solution for Vuex, I hardly could have taken that into account. |
Don't worry about it, we appreciate efforts you put into this and will help with fixing that 😉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gave it a smoke test, seems to be working as expected 🎉
Leaving my thoughts for this PR. I suggest you to wait for another devs opinions, before rewriting anything; then we can find a common ground before putting more efforts into this feature.
Here as with talk-desktop: |
Thank you for your contribution and moving forward to adding the counter-badge in the desktop client! It seems to work, but I agree with @Antreesy's points. We should not create a new store state for the unread counters, as this is not an independent state, but a computation on top of the existing state (conversation list). Having it as a new state will likely lead to inconsistent application state in the future and requires manual updates. This makes sense for performance. However, even with ~1000 conversations counting, there should be no performance issue. Let's simplify it to one getter in the existing |
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Hey, @markusstoll! Do you plan to adjust the PRs? Maybe we can assist with anything? This is an important feature that we'd like to add. If you don't have time now - no problem, but then we'd need to take it over. |
Sorry, I was drawn into some urgent issues in my paid work. I will start the rework soon, hopefully this week |
c93a01c
to
8255759
Compare
Hi, I hope I understood your comments correctly. Pls review the reworked PR - will submit a matching PR for talk-desktop asap |
Hi, I did take into account all your remarks and fixed them where needed. On
Indeed without initial counter is not shown on badge On
You bet, as being a Java Developer for 25 years, I am mostly illiterate on such fancy JavaScript stuff and need AI support for all this syntax. But here I forgot to remove these additions in conversationsStore.js after deciding for smaller approach - I apologise for that. After waiting for this feature for 1.5 years, I finally had to do something about it, using the means I have. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments above are still unresolved
you were right, but pls note the spelling difference, which I changed back to
so it matches the doc in constants and the usage in talk-desktop archived conversations are now ignored |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice enhancements! Tested with following suggestions, to reduce amount of computations.
Feel free to squash all commits into one, and name it according to convention spec. something like feat: <what's it doing>
should be fine. Then I'll trigger the CI to get it merged
…ages changes Signed-off-by: Markus Stoll <[email protected]>
17328ca
to
aca814a
Compare
Thanks for your comments which made this change even more lean and clean. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Markus 🚀
/backport to stable31 |
☑️ Implements issue #14667
I had to introduce some changes to spreed that are described below to create a central unreadCountStore to have an even hook in talk-desktop to get updates of these unreadCounts and enable talk-desktop to set the correct badge count on the app icon.
1. New unreadCountStore
A new Vuex store module that serves as the single source of truth for all unread counters:
2. Integration Points
Conversations Store
Enhanced
addConversation
mutation:Improved
updateConversation
mutation:Updated
deleteConversation
mutation:Messages Store
updateLastReadMessage
action:3. Event System
New event for badge updates:
🏁 Checklist
This issue is not browser depending.
But I added a matching change in talk-desktop and have a working application icon badge implementation.
This is already tested in Windows and MacOs builds of talk-desktop.
Pull request for talk-desktop is about to follow
🛠️ API Checklist
🚧 Tasks
🏁 Checklist
docs/
has been updated or is not required