aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msgview
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2022-03-18 22:35:33 +0100
committerRobin Jarry <robin@jarry.cc>2022-03-18 23:42:07 +0100
commit2512c0403fa42b19c3e87fed44240da045ec902f (patch)
treea258d6a9c70e79cf316985363efcdc9529c91924 /commands/msgview
parent807870ea3542f2fcb00e7e0451af37c224041dfe (diff)
downloadaerc-2512c0403fa42b19c3e87fed44240da045ec902f.tar.gz
statusline: implement per-account status
Implement a statusline state for each account. Keep the ex line and the push notifications global. Add account name prefix to push notifications. Prefix status line with account name when multiple accounts are available. Use account-specific status line for each tab where an account is defined. Handle threading, filter/search, viewer passthrough and connection status. Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands/msgview')
-rw-r--r--commands/msgview/toggle-key-passthrough.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/commands/msgview/toggle-key-passthrough.go b/commands/msgview/toggle-key-passthrough.go
index 6cd575bf..1ac370e6 100644
--- a/commands/msgview/toggle-key-passthrough.go
+++ b/commands/msgview/toggle-key-passthrough.go
@@ -3,6 +3,7 @@ package msgview
import (
"errors"
+ "git.sr.ht/~rjarry/aerc/lib/statusline"
"git.sr.ht/~rjarry/aerc/widgets"
)
@@ -26,10 +27,8 @@ func (ToggleKeyPassthrough) Execute(aerc *widgets.Aerc, args []string) error {
}
mv, _ := aerc.SelectedTab().(*widgets.MessageViewer)
keyPassthroughEnabled := mv.ToggleKeyPassthrough()
- if keyPassthroughEnabled {
- aerc.SetExtraStatus("[passthrough]")
- } else {
- aerc.ClearExtraStatus()
+ if acct := mv.SelectedAccount(); acct != nil {
+ acct.SetStatus(statusline.Passthrough(keyPassthroughEnabled))
}
return nil
}