try better message printing

master
Nicolò Balzarotti 2018-09-18 09:45:57 +02:00
parent 4dea26615b
commit 6aab80a967
2 changed files with 6 additions and 1 deletions

View File

@ -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...)

View File

@ -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"],