mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-23 19:49:56 +01:00
mobile: fix loading
This commit is contained in:
committed by
Abdullah Atta
parent
b413315777
commit
068a99463d
@@ -60,7 +60,7 @@ const PDFPreview = () => {
|
||||
const pdfRef = useRef();
|
||||
const [attachment, setAttachment] = useState(null);
|
||||
const [password, setPassword] = useState("");
|
||||
const progress = useAttachmentProgress(attachment);
|
||||
const [progress] = useAttachmentProgress(attachment);
|
||||
|
||||
useEffect(() => {
|
||||
eSubscribeEvent("PDFPreview", open);
|
||||
@@ -152,9 +152,10 @@ const PDFPreview = () => {
|
||||
}}
|
||||
>
|
||||
<ProgressBarComponent
|
||||
indeterminate
|
||||
indeterminate={!progress}
|
||||
color={colors.accent}
|
||||
borderColor="transparent"
|
||||
progress={parseInt(progress?.value || "100") / 100}
|
||||
/>
|
||||
<Paragraph
|
||||
style={{
|
||||
@@ -162,7 +163,8 @@ const PDFPreview = () => {
|
||||
}}
|
||||
color={colors.light}
|
||||
>
|
||||
Loading ({progress?.percent || "0%"})... Please wait
|
||||
Loading {`${progress?.percent ? `(${progress?.percent})` : ""}`}
|
||||
... Please wait
|
||||
</Paragraph>
|
||||
</Animated.View>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user