mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-06-20 13:51:01 +02:00
minor code changes
This commit is contained in:
parent
dd717a289b
commit
5afc4b4074
@ -457,7 +457,6 @@ Future<void> otherMenuUi(Store node) async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> channelMenuUI(Store node) async {
|
Future<void> channelMenuUI(Store node) async {
|
||||||
//gDebug = 0;
|
|
||||||
bool continueChatMenu = true;
|
bool continueChatMenu = true;
|
||||||
while(continueChatMenu) {
|
while(continueChatMenu) {
|
||||||
int option = showMenu([ 'Show public channels', // 1
|
int option = showMenu([ 'Show public channels', // 1
|
||||||
@ -532,7 +531,6 @@ Future<void> channelMenuUI(Store node) async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> PrivateMenuUI(Store node) async {
|
Future<void> PrivateMenuUI(Store node) async {
|
||||||
//gDebug = 0;
|
|
||||||
bool continueChatMenu = true;
|
bool continueChatMenu = true;
|
||||||
while(continueChatMenu) {
|
while(continueChatMenu) {
|
||||||
int option = showMenu([ 'See personal Inbox',
|
int option = showMenu([ 'See personal Inbox',
|
||||||
@ -612,7 +610,6 @@ Future<void> PrivateMenuUI(Store node) async {
|
|||||||
|
|
||||||
|
|
||||||
Future<void> mainMenuUi(Store node) async {
|
Future<void> mainMenuUi(Store node) async {
|
||||||
|
|
||||||
// at the very beginning, show the tree with re reply and likes, and then show the options menu
|
// at the very beginning, show the tree with re reply and likes, and then show the options menu
|
||||||
// bool hasRepliesAndLikes (Tree t) => t.hasRepliesAndLikes(userPublicKey);
|
// bool hasRepliesAndLikes (Tree t) => t.hasRepliesAndLikes(userPublicKey);
|
||||||
node.printTree(0, DateTime.now().subtract(Duration(days:gNumLastDays)), selectAll);
|
node.printTree(0, DateTime.now().subtract(Duration(days:gNumLastDays)), selectAll);
|
||||||
@ -692,4 +689,4 @@ Future<void> mainMenuUi(Store node) async {
|
|||||||
exit(0);
|
exit(0);
|
||||||
} // end menu switch
|
} // end menu switch
|
||||||
} // end while
|
} // end while
|
||||||
} // end mainMenu
|
} // end mainMenuUi()
|
||||||
|
@ -16,7 +16,7 @@ int gDebug = 0;
|
|||||||
// translate
|
// translate
|
||||||
GoogleTranslator? translator; // initialized in main when argument given
|
GoogleTranslator? translator; // initialized in main when argument given
|
||||||
|
|
||||||
const int gNumTranslateDays = 1;// translate for this number of days
|
const int gNumTranslateDays = 2;// translate for this number of days
|
||||||
bool gTranslate = false; // translate flag
|
bool gTranslate = false; // translate flag
|
||||||
|
|
||||||
// Structure to store kind 0 event meta data, and kind 3 meta data for each user. Will have info from latest
|
// Structure to store kind 0 event meta data, and kind 3 meta data for each user. Will have info from latest
|
||||||
@ -262,20 +262,20 @@ class EventData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( createdAt == 0) {
|
if( createdAt == 0) {
|
||||||
print("debug: createdAt == 0 for event $content");
|
print("debug: createdAt == 0 for event $id $content");
|
||||||
}
|
}
|
||||||
|
|
||||||
String contentShifted = rightShiftContent(tempEvaluatedContent==""?tempContent: tempEvaluatedContent, gSpacesPerDepth * depth + 10);
|
String contentShifted = rightShiftContent(tempEvaluatedContent==""?tempContent: tempEvaluatedContent, gSpacesPerDepth * depth + 10);
|
||||||
|
|
||||||
String strToPrint = "";
|
String strToPrint = "";
|
||||||
|
|
||||||
strToPrint += getDepthSpaces(depth); // printDepth(depth);
|
strToPrint += getDepthSpaces(depth);
|
||||||
strToPrint += ("+-------+\n"); // stdout.write("+-------+\n");
|
strToPrint += ("+-------+\n");
|
||||||
strToPrint += getDepthSpaces(depth); // printDepth(depth);
|
strToPrint += getDepthSpaces(depth);
|
||||||
strToPrint += "|Author : $name id: ${maxN(id)} Time: $strDate\n"; //stdout.write("|Author : $name id: ${maxN(id)} Time: $strDate\n");
|
strToPrint += "|Author : $name id: ${maxN(id)} Time: $strDate\n";
|
||||||
strToPrint += getReactionStr(depth); // only prints if there are any likes/reactions
|
strToPrint += getReactionStr(depth); // only prints if there are any likes/reactions
|
||||||
strToPrint += getDepthSpaces(depth); // printDepth(depth);
|
strToPrint += getDepthSpaces(depth);
|
||||||
strToPrint += "|Message: "; //stdout.write("|Message: ");
|
strToPrint += "|Message: ";
|
||||||
|
|
||||||
String commentColor = "";
|
String commentColor = "";
|
||||||
if( isNotification) {
|
if( isNotification) {
|
||||||
@ -305,15 +305,13 @@ class EventData {
|
|||||||
String tempContent = evaluatedContent.isEmpty? content: evaluatedContent;
|
String tempContent = evaluatedContent.isEmpty? content: evaluatedContent;
|
||||||
|
|
||||||
if( isHidden) {
|
if( isHidden) {
|
||||||
name = "<hidden>";
|
name = strDate = "<hidden>";
|
||||||
strDate = "<hidden>";
|
|
||||||
tempEvaluatedContent = tempContent = "<You have hidden this post>";
|
tempEvaluatedContent = tempContent = "<You have hidden this post>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete supercedes hidden
|
// delete supercedes hidden
|
||||||
if( isDeleted) {
|
if( isDeleted) {
|
||||||
name = "<deleted>";
|
name = strDate = "<deleted>";
|
||||||
strDate = "<deleted>";
|
|
||||||
tempEvaluatedContent = tempContent = content; // content would be changed so show that
|
tempEvaluatedContent = tempContent = content; // content would be changed so show that
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user