2323from meshcore import MeshCore , EventType , logger
2424
2525# Version
26- VERSION = "v1.1.31 "
26+ VERSION = "v1.1.32 "
2727
2828# default ble address is stored in a config file
2929MCCLI_CONFIG_DIR = str (Path .home ()) + "/.config/meshcore/"
@@ -563,8 +563,8 @@ async def interactive_loop(mc, to=None) :
563563 contact = to
564564 prev_contact = None
565565
566- await mc .ensure_contacts ( )
567- await get_channels (mc )
566+ await mc .commands . get_contacts ( anim = True )
567+ await get_channels (mc , anim = True )
568568 await subscribe_to_msgs (mc , above = True )
569569
570570 handle_new_contact .print_new_contacts = True
@@ -978,10 +978,13 @@ async def get_channel_by_name (mc, name):
978978
979979 return None
980980
981- async def get_channels (mc ) :
981+ async def get_channels (mc , anim = False ) :
982982 if hasattr (mc , 'channels' ) :
983983 return mc .channels
984984
985+ if anim :
986+ print ("Fetching channels " , end = "" , flush = True )
987+
985988 ch = 0 ;
986989 mc .channels = []
987990 while True :
@@ -992,6 +995,9 @@ async def get_channels (mc) :
992995 info ["channel_secret" ] = info ["channel_secret" ].hex ()
993996 mc .channels .append (info )
994997 ch = ch + 1
998+ if anim :
999+ print ("." , end = "" , flush = True )
1000+ print (" Done" )
9951001 return mc .channels
9961002
9971003async def next_cmd (mc , cmds , json_output = False ):
0 commit comments