CB-2634 fix: resources sync

This commit is contained in:
Wroud
2022-09-22 12:53:21 +03:00
parent 257d1ffbe4
commit 38c552dc6b
3 changed files with 3 additions and 3 deletions
@@ -97,7 +97,7 @@ export class ConnectionInfoResource extends CachedMapResource<IConnectionInfoPar
this.onConnectionCreate.addHandler(ExecutorInterrupter.interrupter(() => this.sessionUpdate));
permissionsResource.require(this, EPermission.public);
this.sync(this.projectInfoResource, () => CachedMapAllKey);
this.sync(this.projectInfoResource, () => CachedMapAllKey, () => CachedMapAllKey);
sessionDataResource.onDataOutdated.addHandler(() => {
this.sessionUpdate = true;
@@ -111,7 +111,7 @@ export class NavTreeResource extends CachedMapResource<string, string[]> {
// navNodeInfoResource.preloadResource(this);
this.outdateResource(navNodeInfoResource);
this.updateResource(navNodeInfoResource);
this.sync(this.projectInfoResource, () => CachedMapAllKey);
this.sync(this.projectInfoResource, () => CachedMapAllKey, () => CachedMapAllKey);
this.sessionDataResource.outdateResource(this);
this.userInfoResource.onUserChange.addHandler(action(() => {
this.clear();
@@ -64,7 +64,7 @@ export class ProjectsService {
get defaultProject(): ProjectInfo | undefined {
let project = this.userProject;
if (!project && this.activeProjects.length > 0) {
if ((!project || this.activeProjectIds.length > 0) && this.activeProjects.length > 0) {
project = this.activeProjects[0];
}