From fb9e1f79cf8eebce034a89a01939327ed3568d86 Mon Sep 17 00:00:00 2001 From: Radek Czemerys Date: Mon, 5 Oct 2020 00:03:10 +0200 Subject: [PATCH] refactor: stop using safeContent --- src/screens/Root.tsx | 2 +- src/screens/SideMenu/NoteSideMenu.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/screens/Root.tsx b/src/screens/Root.tsx index 3279a580..3c344956 100644 --- a/src/screens/Root.tsx +++ b/src/screens/Root.tsx @@ -170,7 +170,7 @@ export const Root = (props: Props): JSX.Element | null => { } } if ( - note.safeContent.protected && + note.protected && (await application?.privilegesService!.actionRequiresPrivilege( ProtectedAction.ViewProtectedNotes )) diff --git a/src/screens/SideMenu/NoteSideMenu.tsx b/src/screens/SideMenu/NoteSideMenu.tsx index 062ef359..774a7e7f 100644 --- a/src/screens/SideMenu/NoteSideMenu.tsx +++ b/src/screens/SideMenu/NoteSideMenu.tsx @@ -491,7 +491,7 @@ export const NoteSideMenu = (props: Props) => { { text: 'Share', onSelect: shareNote, icon: ICON_SHARE }, ]; - if (!note.safeContent.trashed) { + if (!note.trashed) { rawOptions.push({ text: 'Move to Trash', onSelect: async () => deleteNote(false), @@ -510,7 +510,7 @@ export const NoteSideMenu = (props: Props) => { onSelect: rawOption.onSelect, })); - if (note.safeContent.trashed) { + if (note.trashed) { options = options.concat([ { text: 'Restore',