@@ -17,7 +17,7 @@ import (
17
17
"gitlab.com/tslocum/cbind"
18
18
)
19
19
20
- var VERSION string = "v1.0.4 "
20
+ var VERSION string = "v1.0.5 "
21
21
22
22
var sndTxt string = ""
23
23
var currentReceiver messages.Chat = messages.Chat {}
@@ -60,10 +60,10 @@ func main() {
60
60
topBar .SetScrollable (false )
61
61
topBar .SetText ("[::b] WhatsCLI " + VERSION + " [-::d]Type " + cmdPrefix + "help or press " + config .Config .Keymap .CommandHelp + " for help" )
62
62
topBar .SetBackgroundColor (tcell .ColorNames [config .Config .Colors .Background ])
63
- UpdateStatusBar (messages.SessionStatus {})
64
63
65
64
infoBar = tview .NewTextView ()
66
65
infoBar .SetDynamicColors (true )
66
+ UpdateStatusBar (messages.SessionStatus {})
67
67
68
68
textView = tview .NewTextView ().
69
69
SetDynamicColors (true ).
@@ -590,9 +590,7 @@ func UpdateStatusBar(statusInfo messages.SessionStatus) {
590
590
}
591
591
out += ")[::-] "
592
592
out += statusInfo .LastSeen
593
- go app .QueueUpdateDraw (func () {
594
- infoBar .SetText (out )
595
- })
593
+ infoBar .SetText (out )
596
594
//infoBar.SetText("🔋: ??%")
597
595
}
598
596
@@ -713,15 +711,19 @@ func (u UiHandler) PrintText(msg string) {
713
711
}
714
712
715
713
func (u UiHandler ) PrintFile (path string ) {
716
- PrintImage (path )
714
+ go app .QueueUpdateDraw (func () {
715
+ PrintImage (path )
716
+ })
717
717
}
718
718
719
719
func (u UiHandler ) OpenFile (path string ) {
720
720
open .Run (path )
721
721
}
722
722
723
723
func (u UiHandler ) SetStatus (status messages.SessionStatus ) {
724
- UpdateStatusBar (status )
724
+ go app .QueueUpdateDraw (func () {
725
+ UpdateStatusBar (status )
726
+ })
725
727
}
726
728
727
729
func (u UiHandler ) GetWriter () io.Writer {
0 commit comments