improved processAnyIncomingEvents in social UI menu. moved events file to scripts/

This commit is contained in:
vishalxl
2024-09-29 22:59:26 +05:30
parent cf3ef9fe63
commit 522533d444
3 changed files with 1530 additions and 10 deletions

1
.gitignore vendored
View File

@@ -21,5 +21,6 @@ doc/api/
*.js.map *.js.map
del*.txt del*.txt
bin/nostr_console_win64.exe bin/nostr_console_win64.exe
all_nostr_events.txt
*.exe *.exe
*.zip *.zip

View File

@@ -1351,9 +1351,7 @@ Future<void> socialMenuUi(Store node) async {
while(socialMenuContinue) { while(socialMenuContinue) {
if( !firstTime) { if( !firstTime) {
//stdout.write("calling paie");
await processAnyIncomingEvents(node); // this takes 300 ms await processAnyIncomingEvents(node); // this takes 300 ms
//stdout.write("returned from paie");
} }
firstTime = false; firstTime = false;
@@ -1378,8 +1376,6 @@ Future<void> socialMenuUi(Store node) async {
bool selectorTrees_followActionsNoNotifications (Tree t) => t.treeSelectorUserPostAndLike(getFollows( userPublicKey).union(gDefaultFollows).union({userPublicKey}), enableNotifications: false); bool selectorTrees_followActionsNoNotifications (Tree t) => t.treeSelectorUserPostAndLike(getFollows( userPublicKey).union(gDefaultFollows).union({userPublicKey}), enableNotifications: false);
node.printStoreTrees(0, DateTime.now().subtract(Duration(hours:gHoursDefaultPrint)), selectorTrees_followActionsNoNotifications, true); node.printStoreTrees(0, DateTime.now().subtract(Duration(hours:gHoursDefaultPrint)), selectorTrees_followActionsNoNotifications, true);
await processAnyIncomingEvents(node, true);
break; break;
case 2: case 2:
@@ -1416,7 +1412,6 @@ Future<void> socialMenuUi(Store node) async {
await sendReplyPostLike(node, replyToId, replyKind, content); await sendReplyPostLike(node, replyToId, replyKind, content);
clearScreen(); clearScreen();
await processAnyIncomingEvents(node, true);
break; break;
case 3: case 3:
@@ -1430,7 +1425,6 @@ Future<void> socialMenuUi(Store node) async {
print("No replies or likes."); print("No replies or likes.");
} }
await processAnyIncomingEvents(node, true);
break; break;
case 4: case 4:
clearScreen(); clearScreen();
@@ -1441,7 +1435,6 @@ Future<void> socialMenuUi(Store node) async {
print("No posts made by you in last $gHoursDefaultPrint hours."); print("No posts made by you in last $gHoursDefaultPrint hours.");
} }
await processAnyIncomingEvents(node, true);
break; break;
case 5: case 5:
clearScreen(); clearScreen();
@@ -1452,7 +1445,6 @@ Future<void> socialMenuUi(Store node) async {
} else { } else {
print("No replies/likes made by you in last $gHoursDefaultPrint hours."); print("No replies/likes made by you in last $gHoursDefaultPrint hours.");
} }
await processAnyIncomingEvents(node, true);
break; break;
case 6: case 6:
@@ -1464,7 +1456,6 @@ Future<void> socialMenuUi(Store node) async {
} else { } else {
print("No threads to show where your follows participated in last $gHoursDefaultPrint hours."); print("No threads to show where your follows participated in last $gHoursDefaultPrint hours.");
} }
await processAnyIncomingEvents(node, true);
break; break;
case 7: // search word or event id case 7: // search word or event id
@@ -1574,7 +1565,6 @@ Future<void> socialMenuUi(Store node) async {
} }
} }
} }
await processAnyIncomingEvents(node, true);
break; break;

File diff suppressed because one or more lines are too long