diff --git a/lib/console_ui.dart b/lib/console_ui.dart index 62c9dac..1a5a51c 100644 --- a/lib/console_ui.dart +++ b/lib/console_ui.dart @@ -491,7 +491,7 @@ Future channelMenuUI(Store node) async { //await processNotifications(node); // this takes 300 ms if( !justShowedChannels) { - node.printAllChannelsInfo(20, selectorShowAllRooms); + node.printChannelsOverview(20, selectorShowAllRooms); justShowedChannels = true; } @@ -554,7 +554,7 @@ Future channelMenuUI(Store node) async { break; case 2: - node.printAllChannelsInfo(1000, selectorShowAllRooms); + node.printChannelsOverview(1000, selectorShowAllRooms); justShowedChannels = true; break; @@ -667,7 +667,7 @@ Future mainMenuUi(Store node) async { if( numDirectRoomsPrinted > 0) print("\n"); - int numChannelsPrinted = node.printAllChannelsInfo(20, showNotifications); + int numChannelsPrinted = node.printChannelsOverview(20, showNotifications); if( numChannelsPrinted > 0) print("\n"); diff --git a/lib/settings.dart b/lib/settings.dart index 062ff94..d720480 100644 --- a/lib/settings.dart +++ b/lib/settings.dart @@ -1,6 +1,8 @@ +import 'dart:io'; import 'package:logging/logging.dart'; + final log = Logger('ExampleLogger'); // for debugging @@ -89,7 +91,7 @@ const String gDummyAccountPubkey = "Non"; const int gMinValidTextWidth = 60; // minimum text width acceptable const int gDefaultTextWidth = 96; // default text width int gTextWidth = gDefaultTextWidth; // is changed by --width option -const int gSpacesPerDepth = 4; // constant +const int gSpacesPerDepth = 6; // constant int gNumLeftMarginSpaces = 0;// this number is modified in main String gAlignment = "center"; // is modified in main if --align argument is given const int gapBetweenTopTrees = 1; @@ -334,8 +336,14 @@ String intro = ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚══════╝╚══════╝ -"""; +"""; -print("\n$intro\n"); +List lines = intro.split("\n"); + +//print(gCommentColor); +lines.forEach((line) {print(line.length > stdout.terminalColumns ? line.substring(0, stdout.terminalColumns) : line );}); +//print(gColorEndMarker); + +//print("\n$intro\n"); } diff --git a/lib/tree_ds.dart b/lib/tree_ds.dart index 289df4d..52af6d0 100644 --- a/lib/tree_ds.dart +++ b/lib/tree_ds.dart @@ -245,6 +245,8 @@ class Tree { int printTree(int depth, DateTime newerThan, bool topPost) { int numPrinted = 0; + if( !topPost) + print(""); event.printEvent(depth, topPost); numPrinted++; @@ -507,7 +509,7 @@ class Store { Store.startMarkerStr += ("▄────────────\n"); // bottom half ▄ - int endMarkerDepth = depth + 2 + gTextWidth~/ gSpacesPerDepth - 1; + int endMarkerDepth = depth + 1 + gTextWidth~/ gSpacesPerDepth - 1; Store.endMarkerStr = getDepthSpaces(endMarkerDepth); Store.endMarkerStr += "█\n"; Store.endMarkerStr += "────────────▀".padLeft((endMarkerDepth) * gSpacesPerDepth + gNumLeftMarginSpaces + 1) ; @@ -1040,7 +1042,7 @@ class Store { /** * @printAllChennelsInfo Print one line information about all channels, which are type 40 events ( class ChatRoom) */ - int printAllChannelsInfo(int numToPrint, fRoomSelector selector) { + int printChannelsOverview(int numToPrint, fRoomSelector selector) { int numRoomsSelected = 0; for( int j = 0; j < channels.length; j++) {