Skip to content

Commit

Permalink
fix: incentive email mistakenly showing
Browse files Browse the repository at this point in the history
  • Loading branch information
fttx committed Oct 5, 2024
1 parent a6d34f8 commit a243ab8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion electron
16 changes: 9 additions & 7 deletions ionic/src/models/request.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,15 @@ export class requestModelHelo extends requestModel {


export class requestModelEmailIncentiveCompleted extends requestModel {
action = requestModel.ACTION_EMAIL_INCENTIVE_COMPLETED;
email: string;

public fromObject(obj: ({ email: string })) {
this.email = obj.email;
return this;
}
action = requestModel.ACTION_EMAIL_INCENTIVE_COMPLETED;
email: string;
name: string;

public fromObject(obj: ({ email: string, name: string })) {
this.email = obj.email;
this.name = obj.name;
return this;
}
}

export class requestModelPutScanSessions extends requestModel {
Expand Down
2 changes: 1 addition & 1 deletion ionic/src/pages/home/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export class HomePage {
// this.licenseProvider.limitMonthlyScans(finalNoScans - initialNoScans);
const currentCount = await this.licenseProvider.limitMonthlyScans(1);

if (!localStorage.getItem('email') && currentCount > Config.INCENTIVE_EMAIL_SHOW_THRESHOLD) {
if (!localStorage.getItem('email') && currentCount > Config.INCENTIVE_EMAIL_SHOW_THRESHOLD && this.licenseProvider.activeLicense === LicenseProvider.LICENSE_FREE) {
this.electronProvider.ipcRenderer.send('ipc_show_incentive_email_alert', currentCount);
}

Expand Down

0 comments on commit a243ab8

Please sign in to comment.