From 0427aa5db34b8be11d45e01c9d396e6ba7d2d6ca Mon Sep 17 00:00:00 2001 From: Vishal <64505169+vishalxl@users.noreply.github.com> Date: Wed, 14 Sep 2022 06:58:45 +0530 Subject: [PATCH] improved display a bit reduced print call by 1 to speed up printing on screen. reduced depths allowed. --- lib/event_ds.dart | 1 + lib/settings.dart | 4 ++-- lib/tree_ds.dart | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/event_ds.dart b/lib/event_ds.dart index 63237f6..a92a888 100644 --- a/lib/event_ds.dart +++ b/lib/event_ds.dart @@ -316,6 +316,7 @@ class EventData { String strToPrint = ""; if(!topPost) { + strToPrint += "\n"; strToPrint += getDepthSpaces(depth); strToPrint += " "; // in place of block for top posts } else { diff --git a/lib/settings.dart b/lib/settings.dart index dab86f0..72eefc8 100644 --- a/lib/settings.dart +++ b/lib/settings.dart @@ -100,9 +100,9 @@ const int gNameLengthInPost = 12; // after depth of maxDepthAllowed the thread is re-aligned to left by leftShiftThreadBy const int gMinimumDepthAllowed = 2; const int gMaximumDepthAllowed = 12; -const int gDefaultMaxDepth = 6; +const int gDefaultMaxDepth = 5; int maxDepthAllowed = gDefaultMaxDepth; -const int leftShiftThreadsBy = 4; +const int leftShiftThreadsBy = 3; int gMaxLenUnbrokenWord = 8; // lines are broken if space is at end of line for this number of places diff --git a/lib/tree_ds.dart b/lib/tree_ds.dart index ed6cc35..e12a53b 100644 --- a/lib/tree_ds.dart +++ b/lib/tree_ds.dart @@ -246,8 +246,6 @@ class Tree { int printTree(int depth, DateTime newerThan, bool topPost) { int numPrinted = 0; - if( !topPost) - print(""); event.printEvent(depth, topPost); numPrinted++;