Skip to content

Commit

Permalink
fix: Ensure storage trigger is sent on issue edits
Browse files Browse the repository at this point in the history
  • Loading branch information
strogonoff committed Nov 27, 2019
1 parent 0af282f commit ca634fe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/renderer/issue-editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ export const IssueEditor: React.FC<{ issue: OBIssue, selection?: IssueEditorSele
// TODO: Handle API failure
const updateResult = await request<{ modified: boolean }>('issue-update', { issueId: props.issue.id, data, commit: commit });

if (commit) {
await ipcRenderer.send('remote-storage-trigger-sync');
} else {
await ipcRenderer.send('remote-storage-trigger-uncommitted-check');
}

issueUpdate = setTimeout(() => {
setHasUncommittedChanges(updateResult.modified);

if (commit) {
ipcRenderer.send('remote-storage-trigger-sync');
} else {
ipcRenderer.send('remote-storage-trigger-uncommitted-check');
}
setSaved(true);
}, 500);
});
Expand Down

0 comments on commit ca634fe

Please sign in to comment.