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

fix messages not shown + improve unread marker behavior #4390

Merged

Conversation

mahibi
Copy link
Collaborator

@mahibi mahibi commented Oct 28, 2024

fix #4380

also:

  • improve unread message marker behavior
  • do not use library for popup button but instead use MaterialButton for "Unread Messages" button

🖼️ Screen video

PR4390.mp4

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@mahibi mahibi added the 2. developing Work in progress label Oct 28, 2024
@mahibi mahibi added this to the 20.1.0 milestone Oct 28, 2024
@mahibi mahibi self-assigned this Oct 28, 2024
@mahibi mahibi force-pushed the bugfix/4380/fixMessagesNotShownAndImproveUnreadMarker branch from d089dc7 to 67605bd Compare October 29, 2024 13:22
@mahibi mahibi marked this pull request as ready for review October 29, 2024 13:22
@mahibi mahibi force-pushed the bugfix/4380/fixMessagesNotShownAndImproveUnreadMarker branch from 67605bd to 22c09c2 Compare October 29, 2024 14:01
@mahibi mahibi added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Oct 29, 2024
@mahibi
Copy link
Collaborator Author

mahibi commented Oct 29, 2024

/backport to stable-20.0

this commit will avoid to fail to show messages in adapter. This was caused by the usage of
messagesListAdapter.deleteById("-1");
in UnreadNoticeMessageViewHolder.
The bug seems to exist in the past already but was never reported (Sometimes, when receiving a lot of messages it could happen that some message in between is not shown in UI). However with recent changes after release 20.0.2 the bug appeared more often.

The root cause was not analyzed, but the handling was modified in general as the unread marker behavior was never really good.
By not using deleteById but replace it with new unread marker logic, the bug of disappearing messages is solved and the unread messages marker behavior is improved.

Signed-off-by: Marcel Hibbe <[email protected]>
replace com.nextcloud.ui.popupbubble.PopupBubble with MaterialButton.

com.nextcloud.ui.popupbubble.PopupBubble was forked from
https://github.com/webianks/PopupBubble
which is quite outdated.

com.nextcloud.ui.popupbubble.PopupBubble is still used in ConversationsListActivity but there it should also be removed.

Removing this recycler view stuff will also help a bit to switch to JetpackCompose

Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
@mahibi mahibi force-pushed the bugfix/4380/fixMessagesNotShownAndImproveUnreadMarker branch from 22c09c2 to ff90552 Compare November 5, 2024 12:35
Copy link
Contributor

github-actions bot commented Nov 5, 2024

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/4390-talk.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.

@mahibi mahibi merged commit 967c3ae into master Nov 5, 2024
15 of 16 checks passed
@mahibi mahibi deleted the bugfix/4380/fixMessagesNotShownAndImproveUnreadMarker branch November 5, 2024 12:46
Copy link
Contributor

github-actions bot commented Nov 5, 2024

Codacy

Lint

TypemasterPR
Warnings94152
Errors13289

SpotBugs

CategoryBaseNew
Bad practice66
Correctness1111
Dodgy code7979
Internationalization33
Malicious code vulnerability33
Performance66
Security11
Total109109

Lint increased!

@mahibi
Copy link
Collaborator Author

mahibi commented Nov 8, 2024

/backport to stable-20.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

some messages are not shown in chat when long polling
2 participants