Skip to content

Instantly share code, notes, and snippets.

@tfiechowski
Last active January 7, 2021 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tfiechowski/df9587f6b38509108850ba4169d0af1d to your computer and use it in GitHub Desktop.
Save tfiechowski/df9587f6b38509108850ba4169d0af1d to your computer and use it in GitHub Desktop.
function performUpdates() {
if (!hasPendingUpdates) {
return;
}
clearPendingUpdates();
applyUpdates(); // update photos list with pendingUpdates
try {
await onUpdate(pendingUpdates);
removePhotosLockedFlag();
} catch (exception) {
revertPhotosToOriginalState();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment