mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
react to sequnce changes
This commit is contained in:
committed by
Aiden McClelland
parent
0c6a0218a6
commit
a87a20b41b
@@ -18,6 +18,7 @@ export enum ConnectionStatus {
|
||||
})
|
||||
export class PatchDbModel {
|
||||
connectionStatus$ = new BehaviorSubject(ConnectionStatus.Initializing)
|
||||
sequence$: Observable<number>
|
||||
data: DataModel
|
||||
private patchDb: PatchDB<DataModel>
|
||||
private patchSub: Subscription
|
||||
@@ -30,6 +31,8 @@ export class PatchDbModel {
|
||||
async init (): Promise<void> {
|
||||
const cache = await this.bootstrapper.init()
|
||||
this.patchDb = new PatchDB(this.sources, cache)
|
||||
|
||||
this.sequence$ = this.patchDb.store.sequence$.asObservable()
|
||||
this.data = this.patchDb.store.cache.data
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user