refactor(tracker): use go v1.23 style iterators throughout

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2024-10-15 00:01:02 +03:00
parent 2b7ce39069
commit 97e59c5650
7 changed files with 108 additions and 87 deletions

View File

@ -36,7 +36,7 @@ func (a *PopupAlert) Layout(gtx C) D {
a.prevUpdate = now
var totalY float64 = float64(gtx.Dp(38))
a.alerts.Iterate(func(alert tracker.Alert) {
for _, alert := range a.alerts.Iterate() {
var color, textColor, shadeColor color.NRGBA
switch alert.Priority {
case tracker.Warning:
@ -76,6 +76,6 @@ func (a *PopupAlert) Layout(gtx C) D {
return dims
})
})
})
}
return D{}
}