reduced a line in main menu

clubbed user name print with prompt after menu display
This commit is contained in:
Vishal 2022-11-15 10:26:16 +05:30
parent 828313d940
commit 20a599c539
2 changed files with 8 additions and 4 deletions

View File

@ -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();

View File

@ -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