mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-12-08 11:41:08 +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;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
String getNumDashes(int num) {
|
String getNumDashes(int num, [String dashType = "-"]) {
|
||||||
String s = "";
|
String s = "";
|
||||||
for( int i = 0; i < num; i++) {
|
for( int i = 0; i < num; i++) {
|
||||||
s += "-";
|
s += dashType;
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ class Tree {
|
|||||||
if( depth > maxDepthAllowed) {
|
if( depth > maxDepthAllowed) {
|
||||||
depth = maxDepthAllowed - leftShiftThreadsBy;
|
depth = maxDepthAllowed - leftShiftThreadsBy;
|
||||||
printDepth(depth+1);
|
printDepth(depth+1);
|
||||||
stdout.write("┌${getNumDashes((leftShiftThreadsBy + 1) * gSpacesPerDepth - 1)}+\n");
|
stdout.write("┌${getNumDashes((leftShiftThreadsBy + 1) * gSpacesPerDepth - 1, "─")}┘");
|
||||||
leftShifted = true;
|
leftShifted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -946,7 +946,6 @@ class Store {
|
|||||||
|
|
||||||
int numPrinted = 0;
|
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
|
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++) {
|
for( int i = 0; i < topPosts.length; i++) {
|
||||||
@@ -967,8 +966,8 @@ class Store {
|
|||||||
stdout.write("\n");
|
stdout.write("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
String topPostLine = getDepthSpaces(depth+1);
|
String topPostLine = getDepthSpaces(depth);
|
||||||
topPostLine += ("┬\n");
|
topPostLine += (" █┐\n");
|
||||||
stdout.write(topPostLine);
|
stdout.write(topPostLine);
|
||||||
|
|
||||||
numPrinted += topPosts[i].printTree(depth+1, newerThan, true);
|
numPrinted += topPosts[i].printTree(depth+1, newerThan, true);
|
||||||
@@ -1219,7 +1218,7 @@ class Store {
|
|||||||
for( var tree in allChildEventsMap.values) {
|
for( var tree in allChildEventsMap.values) {
|
||||||
|
|
||||||
if( tree.event.eventData.isDeleted) { // dont write those deleted
|
if( tree.event.eventData.isDeleted) { // dont write those deleted
|
||||||
continue;
|
//continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( gOverWriteFile == false) {
|
if( gOverWriteFile == false) {
|
||||||
|
|||||||
Reference in New Issue
Block a user