From ee735c3aa4191e7f6de1e6dfc0d761ae27f36ff4 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 20 Jun 2019 15:15:41 +0200 Subject: [PATCH] Fix the 'share a folder' button in the drive --- www/drive/inner.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/www/drive/inner.js b/www/drive/inner.js index 9dd883cd3..596465396 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -2167,15 +2167,21 @@ define([ var data = manager.getSharedFolderData(id); var parsed = Hash.parsePadUrl(data.href); if (!parsed || !parsed.hash) { return void console.error("Invalid href: "+data.href); } + var friends = common.getFriends(); var modal = UIElements.createSFShareModal({ origin: APP.origin, pathname: "/drive/", + friends: friends, + title: data.title, + common: common, hashes: { editHash: parsed.hash } }); $shareBlock.click(function () { - UI.openCustomModal(modal); + UI.openCustomModal(modal, { + wide: Object.keys(friends).length !== 0 + }); }); $container.append($shareBlock); };