aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/account.go
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/account.go')
-rw-r--r--widgets/account.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/widgets/account.go b/widgets/account.go
index f1360b8f..5bbe97e1 100644
--- a/widgets/account.go
+++ b/widgets/account.go
@@ -517,9 +517,6 @@ func (acct *AccountView) UpdateSplitView() {
acct.splitDebounce.Stop()
}
fn := func() {
- if acct.split != nil {
- acct.split.Close()
- }
msg, err := acct.SelectedMessage()
if err != nil {
return
@@ -533,6 +530,9 @@ func (acct *AccountView) UpdateSplitView() {
orig := acct.split
acct.split = NewMessageViewer(acct, acct.conf, view)
acct.grid.ReplaceChild(orig, acct.split)
+ if orig != nil {
+ orig.Close()
+ }
})
acct.splitMsg = msg
ui.Invalidate()