Commit ecacd9e0 authored by Regan Hsu's avatar Regan Hsu Committed by Commit Bot

[CrOS Wallpaper] Remove ripple effect on disabled Daily Refresh toggle.

Currently, when the user has the Wallpaper app open, and takes their
chromebook offline, the Daily refresh toggle is disabled but still
produces a ripple effect when the user clicks on the toggle.  This
CL adds the constraint that the ripple effect will only occur when
the Wallpaper app is online.

Bug: 889847
Change-Id: I7ccbe35a82787ff4515b8e1878a4408bde9f9816
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1539019Reviewed-by: default avatarMay Lippert <maybelle@chromium.org>
Commit-Queue: Regan Hsu <hsuregan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#644148}
parent 482ef415
......@@ -1479,7 +1479,7 @@ WallpaperManager.prototype.decorateDailyRefreshItem = function(
var toggleRippleAnimation = enabled => {
dailyRefreshItem.classList.toggle('ripple-animation', enabled);
};
toggleRippleAnimation(true);
toggleRippleAnimation(navigator.online);
window.setTimeout(() => {
toggleRippleAnimation(false);
}, 360);
......
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