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: disable import media during slow sync [WPB-15790] #3852

Closed

Conversation

Garzas
Copy link
Contributor

@Garzas Garzas commented Jan 31, 2025

BugWPB-15790 [Android] Client created a second conversation when sharing an image through share extension


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

  • There is a race condition where sharing an image via the share extension during slow sync could send message to already migrated 1:1 conversation.

Causes (Optional)

  • The temporary inconsistency in conversation resolution led to a state where multiple 1:1 conversations were displayed across different clients.
  • Eventually, the duplicate conversation was removed after a delayed sync resolution, but it caused confusion and message loss.

Solutions

  • Introduced SyncStatusViewModel to track the sync state and prevent sending media when slow sync is in progress.
  • Disabled the send button (loading state) until slow sync completes, ensuring that messages are only sent to a fully resolved conversation.

Attachments (Optional)

Screenshot 2025-01-31 at 13 50 50

@Garzas Garzas self-assigned this Jan 31, 2025
@echoes-hq echoes-hq bot added the echoes: product-roadmap/bug Work contributing to resolve a bug not critical enough to have raised an incident. label Jan 31, 2025
Copy link
Contributor

Built wire-android-staging-compat-pr-3852.apk is available for download

@saleniuk
Copy link
Contributor

saleniuk commented Jan 31, 2025

There is already a mechanism for blocking button click action while the app is syncing or/and connecting, it's called ClickBlockParams and you just pass it as a button parameter. I can see that this button already has this enabled to block when syncing and when connecting

clickBlockParams = ClickBlockParams(blockWhenSyncing = true, blockWhenConnecting = true),

so it should act like that already if nothing is broken there but I can see that it's working, so changes from this PR are likely to be redundant 🤔

@Garzas Garzas closed this Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: product-roadmap/bug Work contributing to resolve a bug not critical enough to have raised an incident. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants