Skip to content

Commit

Permalink
add loading indicator all the time
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieudutour committed Mar 7, 2021
1 parent 3acd970 commit 7d126dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
23 changes: 6 additions & 17 deletions app/src/lib/stores/app-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1984,7 +1984,7 @@ export class AppStore extends TypedBaseStore<IAppState> {
await Promise.all(
modifiedFiles.map(f => {
return this.isParsing(repository, f, async () => {
await parseSketchFile(repository, f, kactusStatus.config)
await this._parseSketchFile(repository, f)
})
})
)
Expand Down Expand Up @@ -3317,9 +3317,7 @@ export class AppStore extends TypedBaseStore<IAppState> {
const branch = await gitStore.createBranch(name, startPoint, noTrackOption)

if (branch !== undefined) {
await this._checkoutBranch(repository, branch, undefined, {
refreshKactus: true,
})
await this._checkoutBranch(repository, branch)
}
}

Expand Down Expand Up @@ -3369,12 +3367,7 @@ export class AppStore extends TypedBaseStore<IAppState> {
}
if (f.parsed) {
try {
await importSketchFile(
repository,
this.sketchPath,
f,
kactus.config
)
await this._importSketchFile(repository, f)
this.repositoryStateCache.updateKactusState(repository, state => ({
files: state.files.map(file =>
file.id !== f.id ? { ...file, imported: true } : file
Expand Down Expand Up @@ -3583,7 +3576,7 @@ export class AppStore extends TypedBaseStore<IAppState> {
private async refreshAfterCheckout(
repository: Repository,
branch: Branch,
previousKactusState: any,
previousKactusState: IKactusState,
refreshKactus?: boolean
) {
this.updateCheckoutProgress(repository, {
Expand Down Expand Up @@ -4457,9 +4450,7 @@ export class AppStore extends TypedBaseStore<IAppState> {
await Promise.all(
kactus.files
.filter(f => f.parsed)
.map(f =>
importSketchFile(repository, this.sketchPath, f, kactus.config)
)
.map(f => this._importSketchFile(repository, f))
)

await this._refreshRepository(repository)
Expand Down Expand Up @@ -4760,9 +4751,7 @@ export class AppStore extends TypedBaseStore<IAppState> {
await Promise.all(
kactus.files
.filter(f => f.parsed)
.map(f =>
importSketchFile(repository, this.sketchPath, f, kactus.config)
)
.map(f => this._importSketchFile(repository, f))
)
} catch (err) {
// probably conflicts
Expand Down
1 change: 1 addition & 0 deletions changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"unreleased": [],
"releases": {
"0.3.33": [
"[Improved] Add loading indicator when parsing Sketch files when ckecking out a branch",
"[Improved] Clearer menu label for reverting commits",
"[Fixed] Refresh branches after creating a new branch",
"[Fixed] Pull requests no longer fail to update until the user switches repositories",
Expand Down

0 comments on commit 7d126dd

Please sign in to comment.