mirror of
https://github.com/Kyren223/eko.git
synced 2026-07-22 03:21:04 +00:00
Fixed a bug where memberlist index will be reset on blur/focus
This commit is contained in:
@@ -511,7 +511,6 @@ func (m *Model) move(direction int) {
|
||||
m.chat.Focus()
|
||||
case FocusRightSidebar:
|
||||
m.networkList.Blur()
|
||||
m.memberList.Blur()
|
||||
m.frequencyList.Blur()
|
||||
m.chat.Blur()
|
||||
m.memberList.Focus()
|
||||
|
||||
@@ -57,7 +57,7 @@ func New() Model {
|
||||
index: -1,
|
||||
focus: false,
|
||||
width: -1,
|
||||
height: 1,
|
||||
height: -1,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,7 +204,9 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
|
||||
|
||||
func (m *Model) Focus() {
|
||||
m.focus = true
|
||||
m.SetIndex(0)
|
||||
if m.index == -1 {
|
||||
m.SetIndex(0)
|
||||
}
|
||||
}
|
||||
|
||||
func (m *Model) Blur() {
|
||||
|
||||
Reference in New Issue
Block a user