Skip to content

Commit

Permalink
add confirmation popup for clearing the queue
Browse files Browse the repository at this point in the history
bump version
  • Loading branch information
issadarkthing committed Aug 18, 2020
1 parent e6d180e commit b288c6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gomu.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/ztrue/tracerr"
)

const VERSION = "v1.4.1"
const VERSION = "v1.5.0"

var gomu *Gomu

Expand Down
7 changes: 6 additions & 1 deletion queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,12 @@ func newQueue() *Queue {
case 'd':
queue.deleteItem(queue.GetCurrentItem())
case 'D':
queue.clearQueue()

confirmationPopup("Are you sure to clear the queue?", func(_ int, label string) {
if label == "yes" {
queue.clearQueue()
}
})
case 'l':
a, err := queue.deleteItem(queue.GetCurrentItem())
if err != nil {
Expand Down

0 comments on commit b288c6c

Please sign in to comment.