From 7c87d911ee7db4eef5d67bda5b7257b3363f5c39 Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Wed, 18 Sep 2019 19:52:50 -0400 Subject: [PATCH] Messages loading in proper order --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 94b6a03..4b5670a 100644 --- a/main.go +++ b/main.go @@ -41,6 +41,7 @@ func populateChat(g *gocui.Gui) { log.Fatal(err) } else { var printMe []string + var actuallyPrintMe string for _, message := range api.Result.Messages { if message.Msg.Content.Type == "text" { msgSender := message.Msg.Sender.Username @@ -50,8 +51,9 @@ func populateChat(g *gocui.Gui) { } } for i := len(printMe) - 1; i >= 0; i-- { - printToView(g, "Chat", printMe[i]) + actuallyPrintMe += printMe[i] + "\n" } + printToView(g, "Chat", actuallyPrintMe) } }