mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-04-18 00:31:13 +02:00
made a string size check to avoid an error for id string non
This commit is contained in:
parent
100ed2dd99
commit
b40a6fe000
@ -347,7 +347,8 @@ class Tree {
|
||||
int latestEventTime = 0;
|
||||
String latestEventId = "";
|
||||
for( String k in allChildEventsMap.keys) {
|
||||
if( k.substring(0, replyToId.length) == replyToId) {
|
||||
//print("$k $replyToId");
|
||||
if( k.length >= replyToId.length && k.substring(0, replyToId.length) == replyToId) {
|
||||
if( ( allChildEventsMap[k]?.e.eventData.createdAt ?? 0) > latestEventTime ) {
|
||||
latestEventTime = allChildEventsMap[k]?.e.eventData.createdAt ?? 0;
|
||||
latestEventId = k;
|
||||
|
Loading…
x
Reference in New Issue
Block a user