fix: prevent crash on task assignee change (#85974)#86067
Closed
arlo-owls wants to merge 1 commit intoExpensify:mainfrom
Closed
fix: prevent crash on task assignee change (#85974)#86067arlo-owls wants to merge 1 commit intoExpensify:mainfrom
arlo-owls wants to merge 1 commit intoExpensify:mainfrom
Conversation
…k to prevent crash on task assignee change Fixes Expensify#85974. PR Expensify#85539 moved the participants cleanup into isOptimisticPersonalDetail conditional, but for existing users this check returns false, leaving stale participant data that causes the app to crash on Android.
Contributor
|
👋 Hi @arlo-owls, thanks for your interest in contributing to Expensify! This PR has been automatically closed because it doesn't appear to meet our contribution requirements:
If you'd like to contribute, please make sure to:
Please review our contributing guidelines for more details. If you believe this was closed in error, please reach out in the #expensify-open-source Slack channel. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed Issues
$250 #85974
Tests
Root Cause
PR #85539 moved
participants: {[assigneeAccountID]: null}inside theisOptimisticPersonalDetail()conditional ingetTaskAssigneeChatOnyxData. For existing users,isOptimisticPersonalDetailreturns false, so the participant cleanup never runs on success. This leaves stale/duplicate participant data that crashes the app on Android when re-rendering.Fix
Move the participant cleanup back outside the
isOptimisticPersonalDetailconditional so it always runs for optimistic chat reports, while keeping the personal details cleanup inside the conditional (since that only applies to optimistic users). This restores the pre-#85539 behavior for participant cleanup.