aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/account.go
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2023-05-13 12:29:16 +0200
committerRobin Jarry <robin@jarry.cc>2023-05-16 13:56:58 +0200
commit06723ff579b692867c6ab87e3838d04e9d044912 (patch)
treeace4f7fe43eccabd6ec732ebfc8757702fd404cc /widgets/account.go
parentda1f014b7050195d7f3e6f849bc105d87efc227b (diff)
downloadaerc-06723ff579b692867c6ab87e3838d04e9d044912.tar.gz
dirtree: clear msglist for virtual nodes
Clear the message list when a virtual node is selected. Add a VirtualNodeCallback to the Dirlist interface. Reported-by: Tim Culverhouse <tim@timculverhouse.com> Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/account.go')
-rw-r--r--widgets/account.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/widgets/account.go b/widgets/account.go
index a99f7a48..e28804de 100644
--- a/widgets/account.go
+++ b/widgets/account.go
@@ -95,6 +95,11 @@ func NewAccountView(
view.msglist = NewMessageList(aerc, view)
view.grid.AddChild(view.msglist).At(0, 1)
+ view.dirlist.OnVirtualNode(func() {
+ view.msglist.SetStore(nil)
+ view.Invalidate()
+ })
+
go func() {
defer log.PanicHandler()