feat(tracker, gioui): add error message if vuanalyzer detects a NaN

Closes #50
This commit is contained in:
vsariola
2021-04-12 20:05:18 +03:00
parent 68a50247bd
commit ce52aa0ee9
3 changed files with 14 additions and 3 deletions

View File

@ -3,6 +3,7 @@ package gioui
import (
"fmt"
"os"
"time"
"gioui.org/app"
"gioui.org/io/clipboard"
@ -29,6 +30,9 @@ func (t *Tracker) Run(w *app.Window) error {
case v := <-t.volumeChan:
t.lastVolume = v
w.Invalidate()
case e := <-t.errorChannel:
t.Alert.Update(e.Error(), Error, time.Second*5)
w.Invalidate()
case e := <-w.Events():
switch e := e.(type) {
case system.DestroyEvent: