diff --git a/lib/settings.dart b/lib/settings.dart index c930dfb..c1269ac 100644 --- a/lib/settings.dart +++ b/lib/settings.dart @@ -52,7 +52,7 @@ List gListRelayUrls2 = [ // name of executable const String exename = "nostr_console"; -const String version = "0.0.7-beta"; +const String version = "0.1.2-beta"; // well known disposable test private key const String gDefaultPublicKey = "e8caa2028a7090ffa85f1afee67451b309ba2f9dee655ec8f7e0a02c29388180"; @@ -239,6 +239,8 @@ usage: $exename [OPTIONS] -s, --disable-file When turned on, even the default filename is not read from. -t, --translate Translate some of the recent posts using Google translate site ( and not api). Google is accessed for any translation request only if this flag is present, and not otherwise. + -h, --help Print help/usage message and exit. + -v, --version Print version and exit. UI Options -a, --align When "left" is given as option to this argument, then the text is aligned to left. By default @@ -248,13 +250,12 @@ usage: $exename [OPTIONS] -m, --maxdepth The maximum depth to which the threads can be displayed. Minimum is $gMinimumDepthAllowed and maximum allowed is $gMaximumDepthAllowed. -c, --color Color option can be green, cyan, white, black, red and blue. - -h, --help Print this usage message and exit. Advanced -y, --difficulty The difficulty number in bits, only for kind 1 messages. Tne next larger number divisible by 4 is taken as difficulty. Can't be more than 24 bits, because otherwise it typically takes too much time. Minimum and default is 0, which means no difficulty. - -v, --overwrite Will over write the file with all the events that were read from file, and all newly received. Is + -e, --overwrite Will over write the file with all the events that were read from file, and all newly received. Is useful when the file has to be cleared of old unused events. A backup should be made just in case of original file before invoking. """; diff --git a/lib/tree_ds.dart b/lib/tree_ds.dart index 75c8def..36a0ded 100644 --- a/lib/tree_ds.dart +++ b/lib/tree_ds.dart @@ -1002,6 +1002,9 @@ class Store { tree.event = newEvent; tree = topPosts.removeAt(i); allChildEventsMap[tree.event.eventData.id] = tree; + if( newEvent.eventData.createdAt > getSecondsDaysAgo(gDontHighlightEventsOlderThan)) { + newEventIdsSet.add(newEvent.eventData.id); + } return; } } @@ -1681,7 +1684,8 @@ class Store { if( k.length >= replyToId.length && k.substring(0, replyToId.length) == replyToId) { // ignore future events TODO - if( ( allChildEventsMap[k]?.event.eventData.createdAt ?? 0) > latestEventTime ) { + if( [1, 40, 140].contains(allChildEventsMap[k]?.event.eventData.kind) + && ( allChildEventsMap[k]?.event.eventData.createdAt ?? 0) > latestEventTime ) { latestEventTime = allChildEventsMap[k]?.event.eventData.createdAt ?? 0; latestEventId = k; } diff --git a/pubspec.yaml b/pubspec.yaml index 4cace2a..99ea13e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: nostr_console description: A multi-platform nostr client built for terminal/console. -version: 0.1.1-beta +version: 0.1.2-beta homepage: https://github.com/vishalxl/nostr_console # Release 0.1.1-beta - reply to feature in public channels