add confirmation popup for clearing the queue

bump version
This commit is contained in:
raziman 2020-08-18 16:44:55 +08:00
parent e6d180ecef
commit b288c6c490
2 changed files with 7 additions and 2 deletions

View File

@ -9,7 +9,7 @@ import (
"github.com/ztrue/tracerr" "github.com/ztrue/tracerr"
) )
const VERSION = "v1.4.1" const VERSION = "v1.5.0"
var gomu *Gomu var gomu *Gomu

View File

@ -386,7 +386,12 @@ func newQueue() *Queue {
case 'd': case 'd':
queue.deleteItem(queue.GetCurrentItem()) queue.deleteItem(queue.GetCurrentItem())
case 'D': case 'D':
confirmationPopup("Are you sure to clear the queue?", func(_ int, label string) {
if label == "yes" {
queue.clearQueue() queue.clearQueue()
}
})
case 'l': case 'l':
a, err := queue.deleteItem(queue.GetCurrentItem()) a, err := queue.deleteItem(queue.GetCurrentItem())
if err != nil { if err != nil {