mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 04:00:59 +01:00
web: ensure that images get downloaded on realtime sync
This commit is contained in:
committed by
Abdullah Atta
parent
e53cc648f0
commit
24c899e709
@@ -119,13 +119,17 @@ export default function EditorManager({
|
||||
|
||||
editorInstance.current?.updateContent(item.data as string);
|
||||
|
||||
db.eventManager.subscribe(
|
||||
EVENTS.syncCompleted,
|
||||
async () => {
|
||||
await db.attachments?.downloadMedia(id);
|
||||
},
|
||||
true
|
||||
);
|
||||
if (appstore.get().isSyncing()) {
|
||||
db.eventManager.subscribe(
|
||||
EVENTS.syncCompleted,
|
||||
async () => {
|
||||
await db.attachments?.downloadMedia(id);
|
||||
},
|
||||
true
|
||||
);
|
||||
} else {
|
||||
await db.attachments?.downloadMedia(id);
|
||||
}
|
||||
} else if (isNote) {
|
||||
if (!locked && item.locked) return EV.publish(EVENTS.vaultLocked);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user