From f64a3d670e7e7098a175d2651e35a7cf2a153b79 Mon Sep 17 00:00:00 2001 From: Vishal <64505169+vishalxl@users.noreply.github.com> Date: Tue, 30 Aug 2022 14:15:22 +0530 Subject: [PATCH] formatting changes --- lib/console_ui.dart | 6 ++++-- lib/settings.dart | 3 ++- lib/tree_ds.dart | 8 +++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/console_ui.dart b/lib/console_ui.dart index 429369f..c06eea1 100644 --- a/lib/console_ui.dart +++ b/lib/console_ui.dart @@ -342,8 +342,7 @@ Future 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 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: diff --git a/lib/settings.dart b/lib/settings.dart index e1f02f2..9dfb00c 100644 --- a/lib/settings.dart +++ b/lib/settings.dart @@ -205,11 +205,12 @@ void printIntro(String msg) { String toPrint = """ + ▀█▄ ▀█▀ ▄ █▀█ █ ▄▄▄ ▄▄▄▄ ▄██▄ ▄▄▄ ▄▄ █ ▀█▄ █ ▄█ ▀█▄ ██▄ ▀ ██ ██▀ ▀▀ █ ███ ██ ██ ▄ ▀█▄▄ ██ ██ - ▄█▄ ▀█ ▀█▄▄█▀ █▀▄▄█▀ ▀█▄▀ ▄██▄ + ▄█▄ ▀█▄ ▀█▄▄█▀ █▀▄▄█▀ ▀█▄▀ ▄██▄ ██████╗ ██████╗ ███╗ ██╗███████╗ ██████╗ ██╗ ███████╗ ██╔════╝██╔═══██╗████╗ ██║██╔════╝██╔═══██╗██║ ██╔════╝ diff --git a/lib/tree_ds.dart b/lib/tree_ds.dart index 863b5cd..75bf98a 100644 --- a/lib/tree_ds.dart +++ b/lib/tree_ds.dart @@ -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 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 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; }