mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-05-07 02:40:36 +02:00
changed menu ordering for profile print
and removed unnecessary asserts which were giving unneeded issues when run with --enable-asserts
This commit is contained in:
parent
531ea1f649
commit
f77e02840e
@ -1208,8 +1208,8 @@ Future<void> socialMenuUi(Store node) async {
|
||||
'Friends Posts/Replies/Likes', // 6
|
||||
'Search word(s) or event id', // 7
|
||||
'Follow new contact', // 8
|
||||
'Change number of days printed', // 9
|
||||
'Show user profile', // 10
|
||||
'Show user profile', // 9
|
||||
'Change number of days printed', // 10
|
||||
'E(x)it to main menu'], // 11
|
||||
"Social Network Menu");
|
||||
|
||||
@ -1376,27 +1376,7 @@ Future<void> socialMenuUi(Store node) async {
|
||||
}
|
||||
break;
|
||||
|
||||
case 9: // change number of days printed
|
||||
clearScreen();
|
||||
stdout.write("Enter number of days for which you want to see posts: ");
|
||||
String? $tempNumDays = stdin.readLineSync();
|
||||
String newNumDays = $tempNumDays??"";
|
||||
|
||||
try {
|
||||
gNumLastDays = int.parse(newNumDays);
|
||||
print("Changed number of days printed to $gNumLastDays");
|
||||
} on FormatException catch (e) {
|
||||
printWarning("Invalid input. Kindly try again.");
|
||||
if( gDebug > 0) print(" ${e.message}");
|
||||
continue;
|
||||
} on Exception catch (e) {
|
||||
printWarning("Invalid input. Kindly try again.");
|
||||
if( gDebug > 0) print(" ${e}");
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
||||
case 10:
|
||||
case 9:
|
||||
clearScreen();
|
||||
stdout.write("Printing profile of a user; type username or first few letters of user's public key( or full public key): ");
|
||||
String? $tempUserName = stdin.readLineSync();
|
||||
@ -1421,6 +1401,26 @@ Future<void> socialMenuUi(Store node) async {
|
||||
}
|
||||
break;
|
||||
|
||||
case 10: // change number of days printed
|
||||
clearScreen();
|
||||
stdout.write("Enter number of days for which you want to see posts: ");
|
||||
String? $tempNumDays = stdin.readLineSync();
|
||||
String newNumDays = $tempNumDays??"";
|
||||
|
||||
try {
|
||||
gNumLastDays = int.parse(newNumDays);
|
||||
print("Changed number of days printed to $gNumLastDays");
|
||||
} on FormatException catch (e) {
|
||||
printWarning("Invalid input. Kindly try again.");
|
||||
if( gDebug > 0) print(" ${e.message}");
|
||||
continue;
|
||||
} on Exception catch (e) {
|
||||
printWarning("Invalid input. Kindly try again.");
|
||||
if( gDebug > 0) print(" ${e}");
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
||||
case 11:
|
||||
default:
|
||||
socialMenuContinue = false;
|
||||
|
@ -1686,7 +1686,6 @@ try {
|
||||
|
||||
//remove padding
|
||||
offset += cipherImpl.doFinal(cipherText, offset, finalPlainText, offset);
|
||||
assert(offset == cipherText.length);
|
||||
return finalPlainText.sublist(0, offset);
|
||||
} catch(e) {
|
||||
if( gDebug >= 0) print("Decryption error = $e");
|
||||
@ -1738,7 +1737,7 @@ String myEncryptRaw( String privateString,
|
||||
|
||||
//add padding
|
||||
offset += cipherImpl.doFinal(uintInputText, offset, outputEncodedText, offset);
|
||||
assert(offset == uintInputText.length);
|
||||
//assert(offset == uintInputText.length);
|
||||
final Uint8List finalEncodedText = outputEncodedText.sublist(0, offset);
|
||||
|
||||
String stringIv = convert.base64.encode(iv);;
|
||||
|
@ -6,7 +6,8 @@ homepage: https://github.com/vishalxl/nostr_console
|
||||
# Release 0.1.9-beta
|
||||
# used kind 104
|
||||
# fix for tag related test fail
|
||||
# default without argument invocation now possible with no pubkey
|
||||
# default without argument invocation now possible with no pubkey
|
||||
|
||||
|
||||
environment:
|
||||
sdk: '>=2.17.3 <3.0.0'
|
||||
|
Loading…
x
Reference in New Issue
Block a user