mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-03-27 02:01:51 +01:00
reduced a line in main menu
clubbed user name print with prompt after menu display
This commit is contained in:
parent
828313d940
commit
20a599c539
@ -378,12 +378,16 @@ int showMenu(List<String> menuOptions, String menuName, [String menuInfo = ""])
|
||||
|
||||
while(true) {
|
||||
//print("\n$menuName\n${getNumDashes(menuName.length)}");
|
||||
printInColor(" $menuName \n", yellowColor);
|
||||
printInColor(" $menuName", yellowColor);
|
||||
print("\n");
|
||||
|
||||
print('Pick an option:');
|
||||
printMenu(menuOptions);
|
||||
String nameToDisplay = userPrivateKey.length == 64?
|
||||
"$gCommentColor${getAuthorName(userPublicKey)}$gColorEndMarker":
|
||||
"${gWarningColor}You are not signed in$gColorEndMarker but are using public key $userPublicKey";
|
||||
|
||||
stdout.write("Type menu option/number: ");
|
||||
stdout.write("Signed in as $nameToDisplay. ");
|
||||
stdout.write("Type option number: ");
|
||||
String? userOptionInput = stdin.readLineSync();
|
||||
String userOption = userOptionInput??"";
|
||||
userOption = userOption.trim();
|
||||
|
@ -1170,7 +1170,7 @@ class Store {
|
||||
//strToWrite += "No new replies/posts.\n";
|
||||
//stdout.write("${getNumDashes(strToWrite.length - 1)}\n$strToWrite");
|
||||
//stdout.write("Total posts : ${count()}\n");
|
||||
stdout.write("Signed in as : $userName\n");
|
||||
|
||||
return;
|
||||
}
|
||||
// TODO call count() less
|
||||
|
Loading…
x
Reference in New Issue
Block a user