summary refs log tree commit diff stats
path: root/commands/msg/read.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-05-28 10:32:32 -0400
committerDrew DeVault <sir@cmpwn.com>2020-05-28 10:32:32 -0400
commit76a91813d8dc0f0011202f8120fc197097f022aa (patch)
treeff4cd6581d3af0911954a37550602366d2bb0e2f /commands/msg/read.go
parentb9af9b5fb1c4f226499ab9c56d3e24f2b9b2db24 (diff)
downloadaerc-76a91813d8dc0f0011202f8120fc197097f022aa.tar.gz
Revert "Remove duration from the status methods"
This reverts commit f06d683688e3d2139b14f67b7e349089e7200bf4.
Diffstat (limited to 'commands/msg/read.go')
-rw-r--r--commands/msg/read.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/commands/msg/read.go b/commands/msg/read.go
index a08b807..e27f743 100644
--- a/commands/msg/read.go
+++ b/commands/msg/read.go
@@ -3,6 +3,7 @@ package msg
 import (
 	"errors"
 	"sync"
+	"time"
 
 	"git.sr.ht/~sircmpwn/getopt"
 
@@ -90,9 +91,9 @@ func submitReadChange(aerc *widgets.Aerc, store *lib.MessageStore,
 	store.Read(uids, newState, func(msg types.WorkerMessage) {
 		switch msg := msg.(type) {
 		case *types.Done:
-			aerc.PushStatus(msg_success)
+			aerc.PushStatus(msg_success, 10*time.Second)
 		case *types.Error:
-			aerc.PushError(" " + msg.Error.Error())
+			aerc.PushError(" "+msg.Error.Error(), 10*time.Second)
 		}
 	})
 }
@@ -105,7 +106,7 @@ func submitReadChangeWg(aerc *widgets.Aerc, store *lib.MessageStore,
 		case *types.Done:
 			wg.Done()
 		case *types.Error:
-			aerc.PushError(" " + msg.Error.Error())
+			aerc.PushError(" "+msg.Error.Error(), 10*time.Second)
 			*success = false
 			wg.Done()
 		}
@@ -135,7 +136,7 @@ func submitToggle(aerc *widgets.Aerc, store *lib.MessageStore, h *helper) error
 	go func() {
 		wg.Wait()
 		if success {
-			aerc.PushStatus(msg_success)
+			aerc.PushStatus(msg_success, 10*time.Second)
 		}
 	}()
 	return nil