Skip to content

Commit

Permalink
fix notification sound not playing no more messages
Browse files Browse the repository at this point in the history
  • Loading branch information
MOTOO11 committed Dec 10, 2016
1 parent d7f6a8b commit 1eb8f53
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions src/renderer/ts/Application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,23 +95,24 @@ export default class Application extends Vue {
if (!this.processing) return;
this.provideTimerLimitCountDown = this.provideTimeLimit;
let provide = () => {
if (this.thread.bookmark != this.thread.allNum()) {
let target = this.thread.messages[this.thread.bookmark];
let tmpLetter = LETTER.split("$1");
let letter = tmpLetter.length > 1 ?
tmpLetter[0] + target.num + tmpLetter[1]
: target.num.toString();
this.pManager.provide(letter + ":", target.text, this.pManager.reading, this.startProvide, this.provideTimeLimit);
this.thread.next();
if (this.autoScroll)
this.scrollTo(this.thread.bookmark);
} else {
this.haltProvide();
}
this.setProvideTimer();
let target = this.thread.messages[this.thread.bookmark];
let tmpLetter = LETTER.split("$1");
let letter = tmpLetter.length > 1 ?
tmpLetter[0] + target.num + tmpLetter[1]
: target.num.toString();
this.pManager.provide(letter + ":", target.text, this.pManager.reading, this.startProvide, this.provideTimeLimit);
this.thread.next();
if (this.autoScroll)
this.scrollTo(this.thread.bookmark);
}
if (this.thread.bookmark != this.thread.allNum()) {
if (this.playingNotificationSound) this.notificationSound(provide);
else provide();
} else {
this.haltProvide();
}
if (this.playingNotificationSound) this.notificationSound(provide);
else provide();
this.setProvideTimer();

}
stopProvide() {
clearTimeout(this.provideTimerID);
Expand Down

0 comments on commit 1eb8f53

Please sign in to comment.