mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-07-12 13:22:20 +02:00
limited menu columns to 4
This commit is contained in:
@ -323,15 +323,9 @@ void printProfile(Store node, String profilePubkey) {
|
||||
}
|
||||
|
||||
void printMenu(List<String> menuOptions) {
|
||||
/*
|
||||
for(int i = 0; i < menuOptions.length;i++) {
|
||||
print(" ${i+1}. ${menuOptions[i]}");
|
||||
}
|
||||
*/
|
||||
|
||||
int longestMenuOption = 0;
|
||||
for(int i = 0; i < menuOptions.length;i++) {
|
||||
//print(" ${i+1}. ${menuOptions[i]}");
|
||||
if( longestMenuOption < menuOptions[i].length) {
|
||||
longestMenuOption = menuOptions[i].length;
|
||||
}
|
||||
@ -346,6 +340,10 @@ void printMenu(List<String> menuOptions) {
|
||||
if( longestMenuOption + 5> gMenuWidth )
|
||||
gMenuWidth = longestMenuOption + 8;
|
||||
|
||||
if( terminalColumns~/gMenuWidth > 4) {
|
||||
terminalColumns = gMenuWidth * 4;
|
||||
}
|
||||
|
||||
//print("gMenuWidth = $gMenuWidth");
|
||||
int rowLen = 0;
|
||||
for(int i = 0; i < menuOptions.length;i++) {
|
||||
|
@ -5,12 +5,7 @@ homepage: https://github.com/vishalxl/nostr_console
|
||||
|
||||
# Release 0.1.3-beta
|
||||
|
||||
# horizontal menu
|
||||
# fixed tests
|
||||
# clear screen for public channels +
|
||||
# improved howto messages
|
||||
# removed red error for default invokation related to invalid old encrypted group keys
|
||||
# more clear screen
|
||||
# limited menu columns to 4
|
||||
|
||||
environment:
|
||||
sdk: '>=2.17.3 <3.0.0'
|
||||
|
Reference in New Issue
Block a user