aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2022-01-19 13:18:09 +0100
committerRobin Jarry <robin@jarry.cc>2022-01-19 17:34:42 +0100
commit1ace50a6b927fde7ef3205001a7acd91e04ac2d7 (patch)
treed635cea128d58542be369e8f269ebd2224f4ac09 /widgets
parent022bf1a11fa65c81dd5c7ded2a205a94bb449a7a (diff)
downloadaerc-1ace50a6b927fde7ef3205001a7acd91e04ac2d7.tar.gz
imap: emits connection error on logout
implements a new connection error message. This allows the worker to emit a connection-related error message to the ui when the imap client closes the loggedOut channel. Signed-off-by: Koni Marti <koni.marti@gmail.com>
Diffstat (limited to 'widgets')
-rw-r--r--widgets/account.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/widgets/account.go b/widgets/account.go
index cf5f1ec1..beedabca 100644
--- a/widgets/account.go
+++ b/widgets/account.go
@@ -288,6 +288,9 @@ func (acct *AccountView) onMessage(msg types.WorkerMessage) {
}
case *types.LabelList:
acct.labels = msg.Labels
+ case *types.ConnError:
+ acct.logger.Printf("Connection error = %v", msg.Error)
+ acct.aerc.PushError(fmt.Sprintf("%v", msg.Error))
case *types.Error:
acct.logger.Printf("%v", msg.Error)
acct.aerc.PushError(fmt.Sprintf("%v", msg.Error))