Skip to content

Commit

Permalink
Fixes notification progress reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Dec 8, 2018
1 parent 474c11d commit 107c955
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/git/gitService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,13 +502,11 @@ export class GitService implements Disposable {
cancellable: true
},
async (progress, token) => {
const total = repositories.length + 1;
let i = 0;
const total = repositories.length;
for (const repo of repositories) {
i++;
progress.report({
message: `${repo.formattedName}...`,
increment: (i / total) * 100
increment: 100 / total
});

if (token.isCancellationRequested) break;
Expand All @@ -532,13 +530,11 @@ export class GitService implements Disposable {
cancellable: true
},
async (progress, token) => {
const total = repositories.length + 1;
let i = 0;
const total = repositories.length;
for (const repo of repositories) {
i++;
progress.report({
message: `${repo.formattedName}...`,
increment: (i / total) * 100
increment: 100 / total
});

if (token.isCancellationRequested) break;
Expand All @@ -562,13 +558,11 @@ export class GitService implements Disposable {
cancellable: true
},
async (progress, token) => {
const total = repositories.length + 1;
let i = 0;
const total = repositories.length;
for (const repo of repositories) {
i++;
progress.report({
message: `${repo.formattedName}...`,
increment: (i / total) * 100
increment: 100 / total
});

if (token.isCancellationRequested) break;
Expand Down

0 comments on commit 107c955

Please sign in to comment.