Display correct owner in the team drive

pull/1/head
yflory 5 years ago
parent 84833afcfa
commit 82b1d975ed

@ -525,7 +525,7 @@ define([
var folders = driveConfig.folders; var folders = driveConfig.folders;
var files = proxy.drive; var files = proxy.drive;
var history = driveConfig.history || {}; var history = driveConfig.history || {};
var edPublic = priv.edPublic; var edPublic = driveConfig.edPublic || priv.edPublic;
APP.origin = priv.origin; APP.origin = priv.origin;
APP.hideDuplicateOwned = Util.find(priv, ['settings', 'drive', 'hideDuplicate']); APP.hideDuplicateOwned = Util.find(priv, ['settings', 'drive', 'hideDuplicate']);
APP.closed = false; APP.closed = false;

@ -93,6 +93,7 @@ define([
if (err) { return void console.error(err); } if (err) { return void console.error(err); }
if (APP.drive && APP.drive.close) { APP.drive.close(); } if (APP.drive && APP.drive.close) { APP.drive.close(); }
APP.team = null; APP.team = null;
APP.teamEdPublic = null;
APP.drive = null; APP.drive = null;
APP.buildUI(common); APP.buildUI(common);
}); });
@ -209,7 +210,8 @@ define([
folders: folders, folders: folders,
updateObject: updateObject, updateObject: updateObject,
updateSharedFolders: updateSharedFolders, updateSharedFolders: updateSharedFolders,
APP: driveAPP APP: driveAPP,
edPublic: APP.teamEdPublic
}); });
APP.drive = drive; APP.drive = drive;
driveAPP.refresh = drive.refresh; driveAPP.refresh = drive.refresh;
@ -262,6 +264,7 @@ define([
sframeChan.query('Q_SET_TEAM', id, function (err) { sframeChan.query('Q_SET_TEAM', id, function (err) {
if (err) { return void console.error(err); } if (err) { return void console.error(err); }
APP.team = id; APP.team = id;
APP.teamEdPublic = Util.find(team, ['keys', 'drive', 'edPublic']);
buildUI(common, true); buildUI(common, true);
}); });
}); });

Loading…
Cancel
Save