Skip to content

Commit

Permalink
add Notice popups during manual syncs
Browse files Browse the repository at this point in the history
  • Loading branch information
kinabalu committed Jun 13, 2024
1 parent b829275 commit dc2b91b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,15 +392,19 @@ class VoiceNotesSettingTab extends PluginSettingTab {
.addButton(button => button
.setButtonText("Manual sync")
.onClick(async (evt) => {
new Notice("Performing manual synchronization without overwriting existing work.")
await this.plugin.sync();
new Notice("Manual synchronization has completed.")
})
)
.addButton(button => button
.setButtonText("Manual sync (overwrite)")
.onClick(async (evt) => {
// Upon a manual sync we are going to forget about existing data so we can sync all again
new Notice("Performing manual synchronization and overwriting all notes.")
this.plugin.syncedRecordingIds = [];
await this.plugin.sync(true);
new Notice("Manual synchronization with overwrite has completed.")
})
)

Expand Down

0 comments on commit dc2b91b

Please sign in to comment.