Skip to content

Commit

Permalink
If we edit project view and not triggered Sync, on project reopening …
Browse files Browse the repository at this point in the history
…the wrong load project data load will be attempted to be attempted to load. (#7134)
  • Loading branch information
dkashyn-sfdc authored Dec 9, 2024
1 parent d5f47f3 commit 3db8a9d
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,18 @@ public void runActivity(Project project) {
if (importSettings == null) {
return;
}
if (Blaze.getUpToDateProjectTypeBeforeSync(project) == ProjectType.QUERY_SYNC) {
ProjectType initialProjectType = importSettings.getProjectType();
ProjectType currentProjectType = Blaze.getUpToDateProjectTypeBeforeSync(project);
if (currentProjectType == ProjectType.QUERY_SYNC) {
// When query sync is not enabled hasProjectData triggers the load
QuerySyncManager.getInstance(project)
.onStartup(QuerySyncActionStatsScope.create(getClass(), null));
return;
}
if (hasProjectData(project, importSettings)) {
BlazeSyncManager.getInstance(project).requestProjectSync(startupSyncParams());
} else {
BlazeSyncManager.getInstance(project).incrementalProjectSync(SYNC_REASON);
if (initialProjectType == currentProjectType && hasProjectData(project, importSettings)) {
BlazeSyncManager.getInstance(project).requestProjectSync(startupSyncParams());
} else {
BlazeSyncManager.getInstance(project).incrementalProjectSync(SYNC_REASON);
}
}
}

Expand Down

0 comments on commit 3db8a9d

Please sign in to comment.