Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-seed all variables/features/envs before refreshing #42

Merged
merged 1 commit into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/UsagesTreeProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import {
JSONMatch,
VariableReference,
getAllVariables,
getAllEnvironments,
getCombinedVariableDetails,
CombinedVariableData,
getOrganizationId,
getAllFeatures,
} from '../cli'

import { showBusyMessage, hideBusyMessage } from './statusBarItem'
Expand Down Expand Up @@ -44,7 +46,7 @@ export class UsagesTreeProvider

private async getCombinedAPIData() {
showBusyMessage('Fetching devcycle data')
const variables = await getAllVariables()
const [variables] = await Promise.all([getAllVariables(), getAllFeatures(), getAllEnvironments()])
Copy link
Contributor

@L-Joli L-Joli Jul 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have initStorage() doing the same thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initStorage isnt being called anywhere anymore. I think it got removed because it was being called right before storage was getting cleared

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually Ill just remove that function altogether

const result = {} as Record<string, VariableCodeReference>
await Promise.all(
Object.entries(variables).map(async ([key, variable]) => {
Expand Down
1 change: 0 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const activate = async (context: vscode.ExtensionContext) => {
SecretStateManager.init(context)
StateManager.globalState = context.globalState
StateManager.workspaceState = context.workspaceState
StateManager.clearState()
const autoLogin = vscode.workspace
.getConfiguration('devcycle-featureflags')
.get('loginOnWorkspaceOpen')
Expand Down
Loading