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 duplicate messages because of multiple scopes #4812

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mahibi
Copy link
Collaborator

@mahibi mahibi commented Mar 19, 2025

fix #4764
this replaces #4801

(also see #4688 for a similar fix where the scope handling was introduced)

🏁 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 3. to review Waiting for reviews label Mar 19, 2025
@mahibi mahibi added this to the 21.1.0 milestone Mar 19, 2025
@mahibi mahibi self-assigned this Mar 19, 2025
@mahibi mahibi mentioned this pull request Mar 19, 2025
5 tasks
fix duplicate messages because of multiple scopes that ran in OfflineFirstChatRepository

Signed-off-by: Marcel Hibbe <[email protected]>
@mahibi mahibi force-pushed the bugfix/4764/fixDuplicateMessages branch from 54242fb to 8436831 Compare March 19, 2025 10:42
@mahibi
Copy link
Collaborator Author

mahibi commented Mar 19, 2025

if it turns out that canceling the scope in onPause is problematic, then we should have a closer look on this chain and analyze why GetCapabilitiesInitialLoadState is called again (e.g. after coming back from taking a photo) which leads to the multiple scopes:

GetCapabilitiesInitialLoadState > chatViewModel.loadMessages > chatRepository.initScopeAndLoadInitialMessages > creates multiple scopes

Copy link
Contributor

Codacy

Lint

TypemasterPR
Warnings9897
Errors99

SpotBugs

CategoryBaseNew
Bad practice66
Correctness222220
Dodgy code7171
Internationalization33
Malicious code vulnerability33
Performance44
Security11
Total310308

Copy link
Contributor

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/4812-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.

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.

Messages appear duplicated after taking a picture
1 participant