Skip to content

Commit

Permalink
fix: sync request before downloading/previewing file (#1003)
Browse files Browse the repository at this point in the history
  • Loading branch information
amanharwara authored Apr 26, 2022
1 parent 63fcd3d commit 9a99cc8
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 9a99cc8

Please sign in to comment.