Skip to content

Commit

Permalink
fixed all news commit stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnstonCode committed Feb 7, 2018
1 parent 4f96be4 commit 32c1f0b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export class Repository {
this.disposables.push(this.conflicts);

const svnConfig = workspace.getConfiguration("svn");

const updateFreqNew = svnConfig.get<number>("svn.newCommits.update");
if (updateFreqNew) {
const interval = setInterval(() => {
Expand All @@ -287,10 +287,10 @@ export class Repository {

@debounce(1000)
async updateNewCommits() {
const newCommits = await this.repository.countNewCommits();
if (newCommits !== this.newCommits) {
this.newCommits = newCommits;
this._onDidChangeNewCommits.fire();
const newCommits = await this.repository.countNewCommit();
if (newCommits !== this.newCommit) {
this.newCommit = newCommits;
this._onDidChangeNewCommit.fire();
}
}

Expand Down Expand Up @@ -544,14 +544,14 @@ export class Repository {
async switchBranch(name: string) {
await this.run(Operation.SwitchBranch, async () => {
await this.repository.switchBranch(name);
this.updateNewsCommits();
this.updateNewCommits();
});
}

async updateRevision(): Promise<string> {
return await this.run<string>(Operation.Update, async () => {
const response = await this.repository.update();
this.updateNewsCommits();
this.updateNewCommits();
return response;
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/statusBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class SvnStatusBar {
const icon = isIdle ? "sync" : "sync~spin";
const title = !isIdle
? "Running"
: this.repository.newsCommit > 0
: this.repository.newCommit > 0
? `${this.repository.newCommit} new commits`
: "Updated";

Expand Down

0 comments on commit 32c1f0b

Please sign in to comment.