mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-12-05 02:01:35 +01:00
sorted direct room main view
made gStore a global. Made directRooms a list rather than a map.
This commit is contained in:
@@ -12,6 +12,8 @@ import 'package:kepler/kepler.dart';
|
||||
|
||||
int gDebug = 0;
|
||||
|
||||
|
||||
|
||||
// translate
|
||||
GoogleTranslator? translator; // initialized in main when argument given
|
||||
|
||||
@@ -131,11 +133,12 @@ class EventData {
|
||||
}
|
||||
}
|
||||
|
||||
if( json['id'] == gCheckEventId) {
|
||||
if( gDebug > 0 && json['id'] == gCheckEventId) {
|
||||
print("\n----------------------------------------Creating EventData with content: ${json['content']}");
|
||||
print("In Event fromJson: got message: $gCheckEventId");
|
||||
}
|
||||
|
||||
|
||||
return EventData(json['id'] as String, json['pubkey'] as String,
|
||||
json['created_at'] as int, json['kind'] as int,
|
||||
json['content'].trim() as String,
|
||||
@@ -793,6 +796,8 @@ bool isWhitespace(String s) {
|
||||
}
|
||||
|
||||
extension StringX on String {
|
||||
|
||||
|
||||
isChannelPageNumber(int max) {
|
||||
|
||||
int? n = int.tryParse(this);
|
||||
|
||||
Reference in New Issue
Block a user