formatting changes

This commit is contained in:
Vishal 2022-08-30 14:15:22 +05:30
parent 1e493147e8
commit f64a3d670e
3 changed files with 11 additions and 6 deletions

View File

@ -342,8 +342,7 @@ Future<void> otherMenuUi(Tree node, var contactList) async {
relays.printInfo();
print("\n");
printUnderlined("Posts");
print("Total number of posts: ${node.count()}");
print("\n");
print("Total number of posts: ${node.count()}\n");
printUnderlined("User Info");
if( userPrivateKey.length == 64) {
print("You are signed in, and your public key is: $userPublicKey");
@ -351,6 +350,9 @@ Future<void> otherMenuUi(Tree node, var contactList) async {
print("You are not signed in, and are using public key: $userPublicKey");
}
print("Your name as seen in metadata event is: ${getAuthorName(userPublicKey)}");
//printUnderlined("Program Arguments");
break;
case 8:

View File

@ -205,11 +205,12 @@ void printIntro(String msg) {
String toPrint =
"""

View File

@ -161,6 +161,8 @@ class Tree {
}
}
//getEvents(tempWithoutParent);
//if( gDebug != 0) print("In Tree FromEvents: at end of tree from events: Total number of chat rooms: ${rooms.length}");
if(gDebug != 0) print("In Tree FromEvents: number of events in map which are not kind 1 = ${numEventsNotPosts}");
if(gDebug != 0) print("In Tree FromEvents: number of events in map of kind 40 = ${numKind40Events}");
@ -1056,8 +1058,6 @@ Tree getTree(Set<Event> events) {
// remove all events other than kind 0 (meta data), 1(posts replies likes), 3 (contact list), 7(reactions), 40 and 42 (chat rooms)
events.removeWhere( (event) => !Tree.typesInEventMap.contains(event.eventData.kind));
print("In getTree: after removing unwanted kind, number of events remaining: ${events.length}");
// process kind 0 events about metadata
int totalKind0Processed = 0, notProcessed = 0;
events.forEach( (event) => processKind0Event(event)? totalKind0Processed++: notProcessed++);
@ -1076,9 +1076,11 @@ Tree getTree(Set<Event> events) {
// translate and expand mentions for all
events.forEach( (event) => event.eventData.translateAndExpandMentions());
if( gDebug > 0) print("In getTree: after removing unwanted kind, number of events remaining: ${events.length}");
// create tree from events
Tree node = Tree.fromEvents(events);
if(gDebug != 0) print("total number of events in main tree = ${node.count()}");
if(gDebug != 0) print("total number of posts/replies in main tree = ${node.count()}");
return node;
}