Use getter

This commit is contained in:
RMidhunSuresh 2023-03-28 17:57:19 +05:30
parent b2d6a78365
commit 38a82b2cb2

View File

@ -26,12 +26,12 @@ type Options = BaseOptions & {
};
export class VerifyEmojisViewModel extends ErrorReportViewModel<SegmentType, Options> {
public isWaiting: boolean = false;
private _isWaiting: boolean = false;
async setEmojiMatch(match: boolean) {
await this.logAndCatch("VerifyEmojisViewModel.setEmojiMatch", async () => {
await this.options.stage.setEmojiMatch(match);
this.isWaiting = true;
this._isWaiting = true;
this.emitChange("isWaiting");
});
}
@ -43,4 +43,8 @@ export class VerifyEmojisViewModel extends ErrorReportViewModel<SegmentType, Opt
get kind(): string {
return "verify-emojis";
}
get isWaiting(): boolean {
return this._isWaiting;
}
}