fix: sync request before downloading/previewing file (#1003)

This commit is contained in:
Aman Harwara
2022-04-26 19:51:55 +05:30
committed by GitHub
parent 63fcd3d217
commit 9a99cc8df2

View File

@@ -217,7 +217,12 @@ export const AttachedFilesButton: FunctionComponent<Props> = observer(
break
}
application.sync.sync().catch(console.error)
if (
action.type !== PopoverFileItemActionType.DownloadFile &&
action.type !== PopoverFileItemActionType.PreviewFile
) {
application.sync.sync().catch(console.error)
}
return true
}