refactor(tracker/gioui): use enums (iota) for EditorEvent

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-06-21 12:04:08 +03:00
parent beef8fe1e0
commit 0ea20ea5bf
3 changed files with 17 additions and 35 deletions

View File

@ -160,11 +160,7 @@ func (pe *UnitEditor) layoutFooter(gtx C, t *Tracker) D {
return hintText.Layout(gtx)
}),
layout.Flexed(1, func(gtx C) D {
for {
_, ok := pe.commentEditor.Update(gtx, t.UnitComment())
if !ok {
break
}
for pe.commentEditor.Update(gtx, t.UnitComment()) != EditorEventNone {
t.InstrumentEditor.Focus()
}
return pe.commentEditor.Layout(gtx, t.UnitComment(), t.Theme, &t.Theme.InstrumentEditor.UnitComment, "---")