mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-04-02 17:08:12 +02:00
increased delay to get more messages. improved mention formatting a bit
This commit is contained in:
parent
f1d9968140
commit
9b215038b5
@ -93,7 +93,7 @@ Future<void> main(List<String> arguments) async {
|
||||
|
||||
int numUserEvents = 0, numFeedEvents = 0, numOtherEvents = 0;
|
||||
|
||||
const int numWaitSeconds = 2000;
|
||||
const int numWaitSeconds = 3000;
|
||||
stdout.write('Waiting for user events to come in....');
|
||||
Future.delayed(const Duration(milliseconds: numWaitSeconds), () {
|
||||
// count user events
|
||||
@ -131,7 +131,7 @@ Future<void> main(List<String> arguments) async {
|
||||
getMultiUserEvents(defaultServerUrl, pTags, events, 300);
|
||||
|
||||
print('Waiting for rest of events to come in....');
|
||||
Future.delayed(const Duration(milliseconds: numWaitSeconds * 1), () {
|
||||
Future.delayed(const Duration(milliseconds: numWaitSeconds * 2), () {
|
||||
// count other events
|
||||
events.forEach((element) { element.eventData.kind == 1? numOtherEvents++: numOtherEvents;});
|
||||
numOtherEvents = numOtherEvents - numFeedEvents - numUserEvents;
|
||||
|
@ -193,11 +193,7 @@ class EventData {
|
||||
return content;
|
||||
}
|
||||
|
||||
String s = "";
|
||||
|
||||
List<String> placeHolders = ["#[0]", "#[1]", "#[2]", "#[3]" ];
|
||||
|
||||
|
||||
List<String> placeHolders = ["#[0]", "#[1]", "#[2]", "#[3]", "#[4]", "#[5]" ];
|
||||
for(int i = 0; i < placeHolders.length; i++) {
|
||||
int index = -1;
|
||||
Pattern p = placeHolders[i];
|
||||
@ -215,7 +211,7 @@ class EventData {
|
||||
//print("tags = $tags");
|
||||
|
||||
//print("in expandMentions: changing content at index i = $i");
|
||||
content = "${content.substring(0, index)} @$author ${content.substring(index + 4)}";
|
||||
content = "${content.substring(0, index)} @$author${content.substring(index + 4)}";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user