mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
fix: always make sure all data is loaded before loading context data #600
This commit is contained in:
parent
c9a4e8270b
commit
10f1ea5a68
1 changed files with 4 additions and 2 deletions
|
|
@ -67,7 +67,8 @@ export class WorkContextService {
|
||||||
|
|
||||||
// CONTEXT LEVEL
|
// CONTEXT LEVEL
|
||||||
// -------------
|
// -------------
|
||||||
activeWorkContextId$: Observable<string | null> = this._store$.pipe(
|
activeWorkContextId$: Observable<string | null> = this._isAllDataLoaded$.pipe(
|
||||||
|
switchMap(() => this._store$),
|
||||||
select(selectActiveContextId),
|
select(selectActiveContextId),
|
||||||
distinctUntilChanged(),
|
distinctUntilChanged(),
|
||||||
shareReplay(1),
|
shareReplay(1),
|
||||||
|
|
@ -77,7 +78,8 @@ export class WorkContextService {
|
||||||
activeWorkContextTypeAndId$: Observable<{
|
activeWorkContextTypeAndId$: Observable<{
|
||||||
activeId: string;
|
activeId: string;
|
||||||
activeType: WorkContextType;
|
activeType: WorkContextType;
|
||||||
}> = this._store$.pipe(
|
}> = this._isAllDataLoaded$.pipe(
|
||||||
|
switchMap(() => this._store$),
|
||||||
select(selectActiveContextTypeAndId),
|
select(selectActiveContextTypeAndId),
|
||||||
distinctUntilChanged(distinctUntilChangedObject),
|
distinctUntilChanged(distinctUntilChangedObject),
|
||||||
shareReplay(1),
|
shareReplay(1),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue