mirror of
https://github.com/bitwarden/browser
synced 2025-12-28 22:23:28 +00:00
* Update imports * Implement observables in a few places * Add tests * Get all clients working * Use _destroy * Address PR feedback * Address PR feedback * Address feedback
19 lines
593 B
TypeScript
19 lines
593 B
TypeScript
import { Subject } from "rxjs";
|
|
|
|
import { SyncNotifierService as SyncNotifierServiceAbstraction } from "../../abstractions/sync/syncNotifier.service.abstraction";
|
|
import { SyncEventArgs } from "../../types/syncEventArgs";
|
|
|
|
/**
|
|
* This class should most likely have 0 dependencies because it will hopefully
|
|
* be rolled into SyncService once upon a time.
|
|
*/
|
|
export class SyncNotifierService implements SyncNotifierServiceAbstraction {
|
|
private _sync = new Subject<SyncEventArgs>();
|
|
|
|
sync$ = this._sync.asObservable();
|
|
|
|
next(event: SyncEventArgs): void {
|
|
this._sync.next(event);
|
|
}
|
|
}
|