mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-08-03 03:36:23 -04:00
checkpoint
This commit is contained in:
parent
3f8b4d2a41
commit
17211f3515
22 changed files with 701 additions and 353 deletions
|
@ -609,7 +609,7 @@ class _DHTLogSpine {
|
|||
// Don't watch for local changes because this class already handles
|
||||
// notifying listeners and knows when it makes local changes
|
||||
_subscription ??=
|
||||
await _spineRecord.listen(localChanges: false, _onSpineChanged);
|
||||
await _spineRecord.listen(localChanges: true, _onSpineChanged);
|
||||
} on Exception {
|
||||
// If anything fails, try to cancel the watches
|
||||
await cancelWatch();
|
||||
|
|
|
@ -12,14 +12,6 @@ class DefaultDHTRecordCubit<T> extends DHTRecordCubit<T> {
|
|||
stateFunction: _makeStateFunction(decodeState),
|
||||
watchFunction: _makeWatchFunction());
|
||||
|
||||
// DefaultDHTRecordCubit.value({
|
||||
// required super.record,
|
||||
// required T Function(List<int> data) decodeState,
|
||||
// }) : super.value(
|
||||
// initialStateFunction: _makeInitialStateFunction(decodeState),
|
||||
// stateFunction: _makeStateFunction(decodeState),
|
||||
// watchFunction: _makeWatchFunction());
|
||||
|
||||
static InitialStateFunction<T> _makeInitialStateFunction<T>(
|
||||
T Function(List<int> data) decodeState) =>
|
||||
(record) async {
|
||||
|
|
|
@ -29,20 +29,6 @@ class DHTRecordCubit<T> extends Cubit<AsyncValue<T>> {
|
|||
});
|
||||
}
|
||||
|
||||
// DHTRecordCubit.value({
|
||||
// required DHTRecord record,
|
||||
// required InitialStateFunction<T> initialStateFunction,
|
||||
// required StateFunction<T> stateFunction,
|
||||
// required WatchFunction watchFunction,
|
||||
// }) : _record = record,
|
||||
// _stateFunction = stateFunction,
|
||||
// _wantsCloseRecord = false,
|
||||
// super(const AsyncValue.loading()) {
|
||||
// Future.delayed(Duration.zero, () async {
|
||||
// await _init(initialStateFunction, stateFunction, watchFunction);
|
||||
// });
|
||||
// }
|
||||
|
||||
Future<void> _init(
|
||||
InitialStateFunction<T> initialStateFunction,
|
||||
StateFunction<T> stateFunction,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue