Crash on delete in empty folder (#213)
This commit is contained in:
parent
030f390436
commit
ddd0fa428f
1 changed files with 3 additions and 0 deletions
|
@ -35,6 +35,9 @@ func (_ Delete) Execute(aerc *widgets.Aerc, args []string) error {
|
||||||
return errors.New("No account selected")
|
return errors.New("No account selected")
|
||||||
}
|
}
|
||||||
store := widget.Store()
|
store := widget.Store()
|
||||||
|
if len(store.Uids) == 0 {
|
||||||
|
return errors.New("No message selected")
|
||||||
|
}
|
||||||
msg := widget.SelectedMessage()
|
msg := widget.SelectedMessage()
|
||||||
_, isMsgView := widget.(*widgets.MessageViewer)
|
_, isMsgView := widget.(*widgets.MessageViewer)
|
||||||
if isMsgView {
|
if isMsgView {
|
||||||
|
|
Loading…
Reference in a new issue