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>
---
widgets/account.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/widgets/account.go b/widgets/account.go
index b5c71c297e73..7c4a5e17d4df 100644
--- a/widgets/account.go+++ b/widgets/account.go
@@ -541,6 +541,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,
--
2.42.0