Commit bd723504 authored by Sasha Morrissey's avatar Sasha Morrissey Committed by Commit Bot

Hide the modified date for Team Drives

Hide the modified date for Team Drives, since it's always set to 1st Jan
1970. In a later patch, we will update it to the correct date.

Bug: 861622
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: I7be57d16fedf62c07cb0eb7bf3e2e32cf01ccaf6
Reviewed-on: https://chromium-review.googlesource.com/1141459
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576362}
parent 39623028
...@@ -139,7 +139,7 @@ MetadataBoxController.prototype.onGeneralMetadataLoaded_ = function( ...@@ -139,7 +139,7 @@ MetadataBoxController.prototype.onGeneralMetadataLoaded_ = function(
this.setDirectorySize_( this.setDirectorySize_(
/** @type {!DirectoryEntry} */ (entry), isSameEntry); /** @type {!DirectoryEntry} */ (entry), isSameEntry);
} }
if (item.modificationTime) { if (item.modificationTime && !util.isTeamDriveRoot(entry)) {
this.metadataBox_.modificationTime = this.metadataBox_.modificationTime =
this.fileMetadataFormatter_.formatModDate(item.modificationTime); this.fileMetadataFormatter_.formatModDate(item.modificationTime);
} }
......
...@@ -899,6 +899,13 @@ FileTable.prototype.renderDate_ = function(entry, columnId, table) { ...@@ -899,6 +899,13 @@ FileTable.prototype.renderDate_ = function(entry, columnId, table) {
* @private * @private
*/ */
FileTable.prototype.updateDate_ = function(div, entry) { FileTable.prototype.updateDate_ = function(div, entry) {
// For now, Team Drive roots have the incorrect modified date value. Hide it
// until we get the proper one (see https://crbug.com/861622).
if (util.isTeamDriveRoot(entry)) {
div.textContent = '--';
return;
}
var item = this.metadataModel_.getCache( var item = this.metadataModel_.getCache(
[entry], ['modificationTime', 'modificationByMeTime'])[0]; [entry], ['modificationTime', 'modificationByMeTime'])[0];
var modTime = this.useModificationByMeTime_ ? var modTime = this.useModificationByMeTime_ ?
......
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