From 8f029327fbfedab475df964f589b35e959f3ba20 Mon Sep 17 00:00:00 2001 From: davidoskky Date: Tue, 17 Aug 2021 21:44:15 +0200 Subject: [PATCH] Correct inconsistent feed selection behaviour --- statusview.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/statusview.go b/statusview.go index 250767b..1f52e52 100644 --- a/statusview.go +++ b/statusview.go @@ -89,7 +89,7 @@ func (t *StatusView) AddFeed(f Feed) { f.DrawToot() t.drawDesc() - if t.lastList == NotificationPaneFocus { + if t.focus == NotificationPaneFocus { t.app.UI.SetFocus(LeftPaneFocus) t.focus = LeftPaneFocus t.lastList = NotificationPaneFocus @@ -185,10 +185,10 @@ func (t *StatusView) inputBoth(event *tcell.EventKey) { t.end() } } - if len(t.feeds) > 0 && t.lastList == LeftPaneFocus { + if len(t.feeds) > 0 && t.focus == LeftPaneFocus { feed := t.feeds[len(t.feeds)-1] feed.Input(event) - } else if t.lastList == NotificationPaneFocus { + } else if t.focus == NotificationPaneFocus { t.notificationView.feed.Input(event) } }