mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-12-07 19:21:04 +01:00
changed dashes etc when left shifting deep threads
This commit is contained in:
@@ -766,10 +766,10 @@ String getNumSpaces(int num) {
|
||||
return s;
|
||||
}
|
||||
|
||||
String getNumDashes(int num) {
|
||||
String getNumDashes(int num, [String dashType = "-"]) {
|
||||
String s = "";
|
||||
for( int i = 0; i < num; i++) {
|
||||
s += "-";
|
||||
s += dashType;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ class Tree {
|
||||
if( depth > maxDepthAllowed) {
|
||||
depth = maxDepthAllowed - leftShiftThreadsBy;
|
||||
printDepth(depth+1);
|
||||
stdout.write("┌${getNumDashes((leftShiftThreadsBy + 1) * gSpacesPerDepth - 1)}+\n");
|
||||
stdout.write("┌${getNumDashes((leftShiftThreadsBy + 1) * gSpacesPerDepth - 1, "─")}┘");
|
||||
leftShifted = true;
|
||||
}
|
||||
|
||||
@@ -946,7 +946,6 @@ class Store {
|
||||
|
||||
int numPrinted = 0;
|
||||
|
||||
depth = depth - 1;
|
||||
topPosts.sort(sortTreeNewestReply); // sorting done only for top most threads. Lower threads aren't sorted so save cpu etc TODO improve top sorting
|
||||
|
||||
for( int i = 0; i < topPosts.length; i++) {
|
||||
@@ -967,8 +966,8 @@ class Store {
|
||||
stdout.write("\n");
|
||||
}
|
||||
|
||||
String topPostLine = getDepthSpaces(depth+1);
|
||||
topPostLine += ("┬\n");
|
||||
String topPostLine = getDepthSpaces(depth);
|
||||
topPostLine += (" █┐\n");
|
||||
stdout.write(topPostLine);
|
||||
|
||||
numPrinted += topPosts[i].printTree(depth+1, newerThan, true);
|
||||
@@ -1219,7 +1218,7 @@ class Store {
|
||||
for( var tree in allChildEventsMap.values) {
|
||||
|
||||
if( tree.event.eventData.isDeleted) { // dont write those deleted
|
||||
continue;
|
||||
//continue;
|
||||
}
|
||||
|
||||
if( gOverWriteFile == false) {
|
||||
|
||||
Reference in New Issue
Block a user