1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-30 10:36:35 +02:00

Don't allow deleting sync folder

This commit is contained in:
Laurent Cozic 2017-11-12 18:59:54 +00:00
parent be77f15ef7
commit 71a97bd45b

View File

@ -90,6 +90,8 @@ class SideBarComponent extends React.Component {
itemContextMenu(event) {
const itemId = event.target.getAttribute('data-id');
if (itemId === Folder.conflictFolderId()) return;
const itemType = Number(event.target.getAttribute('data-type'));
if (!itemId || !itemType) throw new Error('No data on element');
@ -103,7 +105,6 @@ class SideBarComponent extends React.Component {
const menu = new Menu();
menu.append(new MenuItem({label: _('Delete'), click: async () => {
const ok = bridge().showConfirmMessageBox(deleteMessage);
if (!ok) return;