From 1ace50a6b927fde7ef3205001a7acd91e04ac2d7 Mon Sep 17 00:00:00 2001 From: Koni Marti Date: Wed, 19 Jan 2022 13:18:09 +0100 Subject: 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 --- widgets/account.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'widgets') 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)) -- cgit