Add time undo and fill
This commit is contained in:
@ -83,6 +83,16 @@ func (p *TimePage) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
editor := NewTimeEditorPage(p.common, interval)
|
||||
p.common.PushPage(p)
|
||||
return editor, editor.Init()
|
||||
case key.Matches(msg, p.common.Keymap.Fill):
|
||||
row := p.intervals.SelectedRow()
|
||||
if row != nil {
|
||||
interval := (*timewarrior.Interval)(row)
|
||||
p.common.TimeW.FillInterval(interval.ID)
|
||||
return p, tea.Batch(p.getIntervals(), doTick())
|
||||
}
|
||||
case key.Matches(msg, p.common.Keymap.Undo):
|
||||
p.common.TimeW.Undo()
|
||||
return p, tea.Batch(p.getIntervals(), doTick())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user