From 6aab80a9671bb072e25f0559003279b90e270a64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Balzarotti?= Date: Tue, 18 Sep 2018 09:45:57 +0200 Subject: [PATCH] try better message printing --- src/repl.jl | 2 +- src/tui.jl | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/repl.jl b/src/repl.jl index 99c9f60..742c06b 100644 --- a/src/repl.jl +++ b/src/repl.jl @@ -775,7 +775,7 @@ end """Initialize the REPL mode, read config files and start the TUI client """ function repl() - global user, rooms_last_batch + global user, rooms_last_batch, syncstatus userinfo = load_secret_or_login(load_config_file()) repl_init(Base.active_repl) user = MatrixUser(userinfo...) diff --git a/src/tui.jl b/src/tui.jl index 3319876..3e5390e 100644 --- a/src/tui.jl +++ b/src/tui.jl @@ -5,6 +5,7 @@ function updateroomlist(user::MatrixUser) end function startsync() + global syncstatus background_sync(syncstatus) function showevent(_...) @@ -12,6 +13,10 @@ function startsync() let ks = syncstatus.sync["rooms"]["join"] for k in keys(ks) try + for msg in ks[k]["timeline"]["events"] + # Go up + print("\033[F") + end for msg in ks[k]["timeline"]["events"] println(MatrixMsg(msg["sender"], msg["origin_server_ts"],