diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2022-12-27 08:46:40 -0600 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-12-27 21:07:49 +0100 |
commit | 5f57a9404f047615ee70c4d2570245df9ac3ef92 (patch) | |
tree | f170ba82336e4e20be42a7dcffa697c9f7dcaa16 | |
parent | 6fb18793d96e6097f395e8f4b7a460f40d59b57d (diff) | |
download | aerc-5f57a9404f047615ee70c4d2570245df9ac3ef92.tar.gz |
split: close split on update of split view
Commit 6b8e0b19d35a ("split: refactor to prevent stuck splits")
introduced a regression where a split message viewer is not closed when
a new message is selected, leading to every split view staying open in
the background.
Fixes: 6b8e0b19d35a ("split: refactor to prevent stuck splits")
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
-rw-r--r-- | widgets/account.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/widgets/account.go b/widgets/account.go index 19385014..8b3e6a18 100644 --- a/widgets/account.go +++ b/widgets/account.go @@ -506,6 +506,9 @@ func (acct *AccountView) updateSplitView(msg *models.MessageInfo) { acct.splitDebounce.Stop() } fn := func() { + if acct.split != nil { + acct.split.Close() + } lib.NewMessageStoreView(msg, false, acct.Store(), acct.aerc.Crypto, acct.aerc.DecryptKeys, func(view lib.MessageView, err error) { if err != nil { |