File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 8686 "json-joy" : " ^16.25.0" ,
8787 "memfs" : " ^4.11.0" ,
8888 "memory-level" : " ^1.0.0" ,
89+ "rx-use" : " ^1.8.1" ,
8990 "sonic-forest" : " ^1.0.3" ,
9091 "thingies" : " ^2.1.0"
9192 },
Original file line number Diff line number Diff line change @@ -5,9 +5,9 @@ import {EditSessionFactory} from './session/EditSessionFactory';
55import { BinStrLevel , LevelLocalRepoPubSubMessage } from './local/level/types' ;
66import { PubSubBC } from './pubsub' ;
77import { Locks } from 'thingies/lib/Locks' ;
8- import { BehaviorSubject } from 'rxjs' ;
9- import { LevelLocalRepo } from './local/level/LevelLocalRepo' ;
8+ import { LevelLocalRepo , LevelLocalRepoOpts } from './local/level/LevelLocalRepo' ;
109import { Model } from 'json-joy/lib/json-crdt' ;
10+ import { onLine$ } from 'rx-use/lib/onLine$' ;
1111import type { EditSession } from './session/EditSession' ;
1212
1313export interface JsonCrdtRepoOpts {
@@ -35,7 +35,7 @@ export class JsonCrdtRepo {
3535 const pubsub = new PubSubBC < LevelLocalRepoPubSubMessage > ( this . opts . name ) ;
3636 const locks = new Locks ( ) ;
3737 const sid : number = this . readSid ( ) ;
38- const connected$ = new BehaviorSubject ( true ) ;
38+ const connected$ = onLine$ as LevelLocalRepoOpts [ 'connected$' ] ;
3939 const repo = new LevelLocalRepo ( {
4040 kv,
4141 locks,
You can’t perform that action at this time.
0 commit comments