reconciliation work

This commit is contained in:
Christien Rioux 2024-05-30 23:25:47 -04:00
parent c9525bde77
commit 490051a650
12 changed files with 457 additions and 196 deletions

View file

@ -209,8 +209,7 @@ class DHTLog implements DHTDeleteable<DHTLog, DHTLog> {
OwnedDHTRecordPointer get recordPointer => _spine.recordPointer;
/// Runs a closure allowing read-only access to the log
Future<T?> operate<T>(
Future<T?> Function(DHTLogReadOperations) closure) async {
Future<T> operate<T>(Future<T> Function(DHTLogReadOperations) closure) async {
if (!isOpen) {
throw StateError('log is not open"');
}

View file

@ -108,6 +108,7 @@ class DHTLogCubit<T> extends Cubit<DHTLogBusyState<T>>
elements: elements, tail: _tail, count: _count, follow: _follow)));
}
// Tail is one past the last element to load
Future<AsyncValue<IList<DHTLogElementState<T>>>> loadElements(
int tail, int count,
{bool forceRefresh = false}) async {
@ -184,8 +185,7 @@ class DHTLogCubit<T> extends Cubit<DHTLogBusyState<T>>
await super.close();
}
Future<R?> operate<R>(
Future<R?> Function(DHTLogReadOperations) closure) async {
Future<R> operate<R>(Future<R> Function(DHTLogReadOperations) closure) async {
await _initWait();
return _log.operate(closure);
}