Skip to content

Commit

Permalink
fix: avoids sending a toast when selecting again seedType=mouse
Browse files Browse the repository at this point in the history
  • Loading branch information
buhodev committed Oct 31, 2022
1 parent a31681b commit fd3b26a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/components/buhodev/PasswordGenerator.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,13 @@
showSeedGenerator = true
} else if (seedType === 'mouse' && mouseSeed.length === 36) {
setTimeout(() => (showSeedGenerator = false), 1000)
setTimeout(
() => addToast({ message: 'Matrix seed generated', type: 'info', timeout: 3000 }),
1500
)
// this avoidsP sending the toast notification when deselecting and selecting again seedType = 'mouse' on the UI
if (showSeedGenerator === true) {
setTimeout(
() => addToast({ message: 'Matrix seed generated', type: 'info', timeout: 3000 }),
1500
)
}
}
$: if (seedType === 'date') {
Expand Down

0 comments on commit fd3b26a

Please sign in to comment.