mobile: add check before before opening publish note sheet

This commit is contained in:
ammarahm-ed
2022-09-16 10:54:03 +05:00
parent 881e1a02c0
commit c47c6409c9

View File

@@ -71,6 +71,7 @@ const PublishNoteSheet = () => {
}, []);
const open = (item) => {
if (!item) return;
setNote(item);
setPublishing(false);
setSelfDestruct(false);
@@ -168,7 +169,7 @@ const PublishNoteSheet = () => {
}}
>
<DialogHeader
title={note.title}
title={note?.title}
paragraph={`Anyone with the link${
isLocked ? " and password" : ""
} of the published note can view it.`}
@@ -190,10 +191,10 @@ const PublishNoteSheet = () => {
}}
>
Please wait...
{loading &&
{loading && loading.current && loading.total ?
`\nDownloading attachments (${
loading?.current / loading?.total
})`}
})` : ""}
</Paragraph>
</View>
) : (