Repository navigation
Fix a bug with the review history on disconnect experience - #8985
Merged
Merged
Conversation
elliette
reviewed
Mar 4, 2025
| // When disconnecting from an app, prepare the offline state for reviewing | ||
| // history. | ||
| screenControllers.forEachInitialized((screenController) { | ||
| if (screenController is OfflineScreenControllerMixin && |
Member
There was a problem hiding this comment.
small suggestion: Add a getter to ScreenController (e.g. hasOfflineSupport) so that we we don't have to do OfflineScreenControllerMixin type check
Member
Author
There was a problem hiding this comment.
Ack. It is beneficial to do the is check so that screenController is type promoted to OfflineScreenControllerMixin, which allows us to call the methods provided by that mixin. If we used a getter hasOfflineSupport instead for example, we'd have to cast screenController to OfflineScreenControllerMixin before calling maybePrepareDataForReviewingHistory
elliette
approved these changes
Mar 4, 2025
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This was broken by the new screenControllers lifecycle logic added in #8908 and #8916. After the lifecycle changes, the review history on disconnect logic was getting disposed before it got a change to execute. Now we handle this logic in
app.dartwhere the rest of the screen controller lifecycle is managed.