Commit 2de7c56f authored by Sam McNally's avatar Sam McNally Committed by Commit Bot

Treat files without an availableOffline property as available offline.

Currently, the dim-offline class is added to any files either with
availableOffline set to false or undefined. It should only be applied to
files with availableOffline set to false. Explicitly check for equality
to false rather than relying on truthiness.

Bug: 885302
Change-Id: If948f161d64dc34280a12f275cd6f07e98356030
Reviewed-on: https://chromium-review.googlesource.com/1232795
Commit-Queue: Noel Gordon <noel@chromium.org>
Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592296}
parent a8628557
...@@ -205,10 +205,10 @@ filelist.renderFileNameLabel = function(doc, entry) { ...@@ -205,10 +205,10 @@ filelist.renderFileNameLabel = function(doc, entry) {
filelist.updateListItemExternalProps = function( filelist.updateListItemExternalProps = function(
li, externalProps, isTeamDriveRoot) { li, externalProps, isTeamDriveRoot) {
if (li.classList.contains('file')) { if (li.classList.contains('file')) {
if (externalProps.availableOffline) if (externalProps.availableOffline === false)
li.classList.remove('dim-offline');
else
li.classList.add('dim-offline'); li.classList.add('dim-offline');
else
li.classList.remove('dim-offline');
// TODO(mtomasz): Consider adding some vidual indication for files which // TODO(mtomasz): Consider adding some vidual indication for files which
// are not cached on LTE. Currently we show them as normal files. // are not cached on LTE. Currently we show them as normal files.
// crbug.com/246611. // crbug.com/246611.
......
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