Using QueueUpdateDraw() instead of Draw()

The Draw() function still seems to slow down the App
Hence Using QueueUpdateDraw() this makes it a little faster

The Problem now is that the ProgressBar constantly makes request to mpd
which in turn causes the slow down.
This commit is contained in:
aditya-K2
2022-10-03 15:37:26 +05:30
parent 79841c1b91
commit 06da246c3a
3 changed files with 4 additions and 3 deletions

View File

@@ -338,8 +338,9 @@ func main() {
})
go func() {
drawFunc := func() { ui.ProgressFunction() }
for {
ui.Ui.App.Draw()
ui.Ui.App.QueueUpdateDraw(drawFunc)
time.Sleep(time.Second)
}
}()