From cb4d384c5f4903685620af0f150f5112d790c282 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 8 May 2022 12:12:43 +0100 Subject: [PATCH] Make fetching quotes concurrent. --- cmd/mop/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/mop/main.go b/cmd/mop/main.go index a150347..6a696ec 100644 --- a/cmd/mop/main.go +++ b/cmd/mop/main.go @@ -138,7 +138,7 @@ loop: screen.Resize() if !showingHelp { screen.Draw(market) - redrawQuotesFlag = true + redrawQuotesFlag = true } else { screen.Draw(help) } @@ -162,7 +162,8 @@ loop: case <-quotesQueue.C: if !showingHelp && !paused && len(keyboardQueue) == 0 { - screen.Draw(quotes) + go quotes.Fetch() + redrawQuotesFlag = true } case <-marketQueue.C: