From d3db915927f1a286651514add603547215f7b3e6 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 7 Jan 2021 16:59:29 +0100 Subject: [PATCH] Fix inconsistency between SF title in the tree and in the content --- www/common/drive-ui.js | 3 ++- www/common/proxy-manager.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 10bd55834..f96f38a0e 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -3945,7 +3945,8 @@ define([ var newRoot = Util.find(manager, ['folders', sfId, 'proxy', manager.user.userObject.ROOT]) || {}; subfolder = manager.hasSubfolder(newRoot); // Fix name - key = manager.getSharedFolderData(sfId).title || Messages.fm_deletedFolder; + var sfData = manager.getSharedFolderData(sfId); + key = sfData.title || sfData.lastTitle || Messages.fm_deletedFolder; // Fix icon $icon = isCurrentFolder ? $sharedFolderOpenedIcon : $sharedFolderIcon; isSharedFolder = sfId; diff --git a/www/common/proxy-manager.js b/www/common/proxy-manager.js index 17b4fec55..3b95ad925 100644 --- a/www/common/proxy-manager.js +++ b/www/common/proxy-manager.js @@ -973,8 +973,8 @@ define([ if (!resolved.id) { var el = Env.user.userObject.find(resolved.path); if (Env.user.userObject.isSharedFolder(el) && Env.folders[el]) { - Env.folders[el].proxy.metadata.title = data.newName; - Env.user.proxy[UserObject.SHARED_FOLDERS][el].lastTitle = data.newName; + Env.folders[el].proxy.metadata.title = data.newName || Messages.fm_folder; + Env.user.proxy[UserObject.SHARED_FOLDERS][el].lastTitle = data.newName || Messages.fm_folder; return void cb(); } }