mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
CB-2634 fix: resources sync
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user