forked from mozilla-mobile/fenix
-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes mozilla-mobile#21871 - Eagerly update UI state after search gr…
…oup removal Before this patch, this was the behavior - 'remove' button is clicked, we'd ask the storage to remove metadata (on its IO thread), then navigate to Home Screen. This resulted in a race we could end-up on the Home Screen before delete finishes, so the search groups do not appear to be removed (but, refreshing the Home Screen again shows that they are removed). This also resulted in an unnecessary navigation which felt very janky (screen will "scroll" to the top) and was way more work than necessary. After this patch, we: - dispatch two actions (on browserstore, on homefragmentstore) which remove the search groups from any relevant in-memory state; any UI bound to this state will be automatically "refreshed" - no longer navigate as part of the remove action, so the UI doesn't move and removal happens "in-place"
- Loading branch information
Showing
4 changed files
with
31 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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