Commit 905c1cb4 authored by Thomas Tangl's avatar Thomas Tangl Committed by Commit Bot

Fix sync error updates for avatar button

When the sync error state changes from one error
to another, the AvatarToolbarButton was not updated.
This CL fixes this.

Bug: 881874
Change-Id: I247cf12a18f8122a22b2d51dd5e6f1febdd6f432
Reviewed-on: https://chromium-review.googlesource.com/1215864Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Thomas Tangl <tangltom@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589894}
parent 5145e447
......@@ -30,10 +30,9 @@ void AvatarButtonErrorController::UpdateSigninError(bool has_signin_error) {
}
void AvatarButtonErrorController::UpdateSyncError(bool has_sync_error) {
bool had_error = HasAvatarError();
has_sync_error_ = has_sync_error;
if (had_error != HasAvatarError())
delegate_->OnAvatarErrorChanged();
// Always notify observers, so they can handle errors differently.
delegate_->OnAvatarErrorChanged();
}
AvatarButtonErrorController::SigninErrorObserver::SigninErrorObserver(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment