mirror of
https://github.com/anotherhadi/spilltea.git
synced 2026-05-20 17:52:33 +02:00
add pages "update" label
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -21,6 +21,9 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
prevID = m.findings[m.cursor].ID
|
||||
}
|
||||
m.findings = msg.Findings
|
||||
if len(m.findings) > m.knownCount {
|
||||
m.hasUnread = true
|
||||
}
|
||||
if m.cursor >= len(m.findings) {
|
||||
m.cursor = max(0, len(m.findings)-1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user