fix: make resolving less jumpy
This commit is contained in:
7
tui.go
7
tui.go
@@ -966,6 +966,13 @@ func (m App) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
if m.threadIndex >= 0 && m.threadIndex < len(m.details.Threads) {
|
||||
selected = m.details.Threads[m.threadIndex].ID
|
||||
}
|
||||
if msg.thread.IsResolved && selected == msg.threadID {
|
||||
if m.threadIndex+1 < len(m.details.Threads) {
|
||||
selected = m.details.Threads[m.threadIndex+1].ID
|
||||
} else if m.threadIndex > 0 {
|
||||
selected = m.details.Threads[m.threadIndex-1].ID
|
||||
}
|
||||
}
|
||||
for index := range m.details.Threads {
|
||||
if m.details.Threads[index].ID != msg.threadID {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user