aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2023-09-12 09:55:33 -0500
committerRobin Jarry <robin@jarry.cc>2023-09-18 21:15:58 +0200
commit65db1c6513d655aec2ab1345fb68ba0349dfc79f (patch)
treeb4e2159d1e0cb67c3c31bb13ee94e1a7b1bbed9f /widgets
parent4e666b146fb6e0e417def15000ff025fb431b618 (diff)
downloadaerc-65db1c6513d655aec2ab1345fb68ba0349dfc79f.tar.gz
split: remove previous split from grid
Remove the previous split from the account grid view. When adding a new child at an existing location, the content is appended to a slice instead of replacing any old values. The old content must be explicitly removed. Reported-by: inwit <inwit@sindominio.net> Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'widgets')
-rw-r--r--widgets/account.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/widgets/account.go b/widgets/account.go
index 47bc9924..982d75f8 100644
--- a/widgets/account.go
+++ b/widgets/account.go
@@ -540,6 +540,7 @@ func (acct *AccountView) updateSplitView(msg *models.MessageInfo) {
}
fn := func() {
if acct.split != nil {
+ acct.grid.RemoveChild(acct.split)
acct.split.Close()
}
lib.NewMessageStoreView(msg, false, acct.Store(), acct.aerc.Crypto, acct.aerc.DecryptKeys,