added comment etc

This commit is contained in:
Vishal 2022-12-02 12:00:12 +05:30
parent 1593ba5853
commit b4e2a7835a

View File

@ -911,11 +911,9 @@ class Event {
newEventData.isNotification = true;
return Event(json[0] as String, json[1] as String, newEventData, [relay], d, fromFile );
} on Exception catch(e) {
if( gDebug> 0) {
print("Could not create event. $e");
print("problem str: $d\n");
if( gDebug > 0) {
print("Could not create event. $e\nproblem str: $d\n");
}
//print("Caught an exception in Event.fromJson");
throw e;
}
}
@ -1537,7 +1535,10 @@ String myEncryptRaw( String privateString,
return outputPlainText;
}
/**
* Read events from file. a flag is set for such events, so that when writing events back, the ones read from file aren't added, and only
* new events from relays are written to file.
*/
Set<Event> readEventsFromFile(String filename) {
Set<Event> events = {};
final File file = File(filename);