Commit 15ce8b77 authored by Alex Danilo's avatar Alex Danilo Committed by Commit Bot

Make completed panels auto-delete

Adds a setTimeout that when fired, deletes the file operation completed
panel. If the user cancels before it fires, it doesn't matter since the
logic inside the display panel checks if it exists anyway.

Timeout is set to 7 seconds, might revisit if it's too long.

Bug: 947388
Change-Id: I561bb910b3e74ecb48fe30e7dcfb551d2639058e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1698366
Commit-Queue: Alex Danilo <adanilo@chromium.org>
Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676770}
parent e9c763fd
...@@ -435,6 +435,11 @@ class ProgressCenterPanel { ...@@ -435,6 +435,11 @@ class ProgressCenterPanel {
this.completedHost_.removePanelItem(donePanelItem); this.completedHost_.removePanelItem(donePanelItem);
} }
}; };
// Delete after 7 seconds, doesn't matter if it's manually deleted
// before the timer fires, as removePanelItem handles that case.
setTimeout(() => {
this.completedHost_.removePanelItem(donePanelItem);
}, 7000);
// Drop through to remove the progress panel. // Drop through to remove the progress panel.
case 'canceled': case 'canceled':
// Remove the feedback panel when complete. // Remove the feedback panel when complete.
......
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