-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deduplicate status and cleared calls in ErrorRequestCoordinator
Previously we'd let both the the primary and the error request notify when the status of a request changes (ie cleared -> running). That would lead to duplicate running calls, once for the primary request, then when it failed, again for the error request. This change also relaxes the requirements for canSetImage to be either request because we only ever run one at a time. It also simplifies canNotifyCleared to just the primary. For notifyCleared we just need one or the other request to do it, it doesn't particularly matter which one. There's no defined agreement over whether the primary's placehodler will be used, or the error if both have placeholders. Using the primary's always seems more coherent.
- Loading branch information
Showing
2 changed files
with
63 additions
and
18 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