mirror of
https://github.com/bitwarden/browser
synced 2025-12-22 19:23:52 +00:00
[PM-10381] Fix waiting for last sync - Browser Refresh (#10438)
* [PM-10381] Add activeUserLastSync$ to SyncService * [PM-10381] Introduce waitUtil operator * [PM-10381] Use new activeUserLastSync$ observable to wait until a sync completes before attempting to get decrypted ciphers * [PM-10381] Fix failing test --------- Co-authored-by: bnagawiecki <107435978+bnagawiecki@users.noreply.github.com>
This commit is contained in:
@@ -34,6 +34,12 @@ export abstract class SyncService {
|
||||
*/
|
||||
abstract lastSync$(userId: UserId): Observable<Date | null>;
|
||||
|
||||
/**
|
||||
* Retrieves a stream of the currently active user's last sync date.
|
||||
* Or null if there is no current active user or the active user has not synced before.
|
||||
*/
|
||||
abstract activeUserLastSync$(): Observable<Date | null>;
|
||||
|
||||
/**
|
||||
* Optionally does a full sync operation including going to the server to gather the source
|
||||
* of truth and set that data to state.
|
||||
|
||||
Reference in New Issue
Block a user