mirror of
https://github.com/anotherhadi/spilltea.git
synced 2026-05-20 09:42:34 +02:00
Add flags to history
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -230,6 +230,12 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
}
|
||||
}
|
||||
|
||||
case key.Matches(msg, h.Flag):
|
||||
if len(m.entries) > 0 && m.database != nil {
|
||||
m.database.ToggleFlag(m.entries[m.cursor].ID)
|
||||
return m, m.RefreshCmd()
|
||||
}
|
||||
|
||||
case key.Matches(msg, h.DeleteEntry):
|
||||
if len(m.entries) > 0 {
|
||||
id := m.entries[m.cursor].ID
|
||||
|
||||
Reference in New Issue
Block a user