not much better, some race condition exists. figuring that out.

This commit is contained in:
Christien Rioux 2024-02-29 21:21:20 -05:00
parent ce4601b575
commit f896fc822c
2 changed files with 4 additions and 4 deletions

View File

@ -41,11 +41,11 @@ class ContactInvitationListCubit
final accountRecordKey = final accountRecordKey =
activeAccountInfo.userLogin.accountRecordInfo.accountRecord.recordKey; activeAccountInfo.userLogin.accountRecordInfo.accountRecord.recordKey;
final contactInvitationListRecordKey = final contactInvitationListRecordPointer =
account.contactInvitationRecords.toVeilid(); account.contactInvitationRecords.toVeilid();
final dhtRecord = await DHTShortArray.openOwned( final dhtRecord = await DHTShortArray.openOwned(
contactInvitationListRecordKey, contactInvitationListRecordPointer,
parent: accountRecordKey); parent: accountRecordKey);
return dhtRecord; return dhtRecord;

View File

@ -24,7 +24,7 @@ class DHTShortArrayCubit<T> extends Cubit<DHTShortArrayBusyState<T>>
_wantsCloseRecord = true; _wantsCloseRecord = true;
// Make initial state update // Make initial state update
await _refreshNoWait(); unawaited(_refreshNoWait());
_subscription = await _shortArray.listen(_update); _subscription = await _shortArray.listen(_update);
}); });
} }
@ -37,7 +37,7 @@ class DHTShortArrayCubit<T> extends Cubit<DHTShortArrayBusyState<T>>
super(const BlocBusyState(AsyncValue.loading())) { super(const BlocBusyState(AsyncValue.loading())) {
_initFuture = Future(() async { _initFuture = Future(() async {
// Make initial state update // Make initial state update
await _refreshNoWait(); unawaited(_refreshNoWait());
_subscription = await shortArray.listen(_update); _subscription = await shortArray.listen(_update);
}); });
} }