mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
purge msgs before subscription to be able to scroll back through old msgs
This commit is contained in:
parent
c0a881f3f6
commit
f0888d3e86
1 changed files with 6 additions and 5 deletions
|
|
@ -766,6 +766,7 @@ Use \"to\" to select recipient, use Tab to complete name ...
|
|||
Some cmds have an help accessible with ?<cmd>. Do ?[Tab] to get a list.
|
||||
\"quit\", \"q\", CTRL+D will end interactive mode""")
|
||||
|
||||
|
||||
contact = to
|
||||
prev_contact = None
|
||||
|
||||
|
|
@ -774,16 +775,16 @@ Some cmds have an help accessible with ?<cmd>. Do ?[Tab] to get a list.
|
|||
|
||||
await get_contacts(mc, anim=True)
|
||||
await get_channels(mc, anim=True)
|
||||
|
||||
# Call sync_msg before going further so there is no issue when scrolling
|
||||
# long list of msgs
|
||||
await next_cmd(mc, ["sync_msgs"])
|
||||
|
||||
await subscribe_to_msgs(mc, above=True)
|
||||
|
||||
handle_new_contact.print_new_contacts = True
|
||||
|
||||
try:
|
||||
while True: # purge msgs
|
||||
res = await mc.commands.get_msg()
|
||||
if res.type == EventType.NO_MORE_MSGS:
|
||||
break
|
||||
|
||||
if os.path.isdir(MCCLI_CONFIG_DIR) :
|
||||
our_history = FileHistory(MCCLI_HISTORY_FILE)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue