mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 01:45:36 +00:00
ui: shorten OpReader.Decode for loops
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-5
@@ -158,11 +158,7 @@ func (w *Window) Draw(root *ui.Ops) {
|
||||
func collectRedraws(r *ui.OpsReader) (time.Time, bool) {
|
||||
var t time.Time
|
||||
redraw := false
|
||||
for {
|
||||
encOp, ok := r.Decode()
|
||||
if !ok {
|
||||
break
|
||||
}
|
||||
for encOp, ok := r.Decode(); ok; encOp, ok = r.Decode() {
|
||||
switch ops.OpType(encOp.Data[0]) {
|
||||
case ops.TypeInvalidate:
|
||||
var op ui.InvalidateOp
|
||||
|
||||
Reference in New Issue
Block a user