diff --git a/lib/tick.dart b/lib/tick.dart index 6d29caf..7e55da5 100644 --- a/lib/tick.dart +++ b/lib/tick.dart @@ -180,7 +180,7 @@ class BackgroundTickerState extends ConsumerState { activeAccountInfo: activeAccountInfo, remoteIdentityPublicKey: remoteIdentityPublicKey, remoteConversationRecordKey: remoteConversationRecordKey); - if (newMessages != null) { + if (newMessages != null && newMessages.isNotEmpty) { final changed = await mergeLocalConversationMessages( activeAccountInfo: activeAccountInfo, localConversationRecordKey: localConversationRecordKey, diff --git a/lib/veilid_support/dht_support/src/dht_record_pool.dart b/lib/veilid_support/dht_support/src/dht_record_pool.dart index 3f2afae..cbd879e 100644 --- a/lib/veilid_support/dht_support/src/dht_record_pool.dart +++ b/lib/veilid_support/dht_support/src/dht_record_pool.dart @@ -78,7 +78,6 @@ class DHTRecordPool with AsyncTableDBBacked { return instanceSetupMutex.protect(() async { if (_singleton == null) { final routingContext = await Veilid.instance.routingContext(); - final globalPool = DHTRecordPool._(Veilid.instance, routingContext); globalPool._state = await globalPool.load(); _singleton = globalPool; diff --git a/lib/veilid_support/dht_support/src/dht_short_array.dart b/lib/veilid_support/dht_support/src/dht_short_array.dart index cedd0a3..82b701f 100644 --- a/lib/veilid_support/dht_support/src/dht_short_array.dart +++ b/lib/veilid_support/dht_support/src/dht_short_array.dart @@ -281,7 +281,7 @@ class DHTShortArray { /// Pull the latest or updated copy of the head record from the network Future _refreshHead( - {bool forceRefresh = false, bool onlyUpdates = false}) async { + {bool forceRefresh = true, bool onlyUpdates = false}) async { // Get an updated head record copy if one exists final head = await _headRecord.getProtobuf(proto.DHTShortArray.fromBuffer, forceRefresh: forceRefresh, onlyUpdates: onlyUpdates);