Skip to content

Commit

Permalink
#873 - Fixing rating crash
Browse files Browse the repository at this point in the history
  • Loading branch information
graphefruit committed Jan 5, 2025
1 parent e06f963 commit d8840c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/settings/settings.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ <h2>{{"PAGE_SETTINGS_BREW_RATING" | translate}}</h2>
</ion-item>
<ion-item style="top:-10px;" lines="none">
<ion-range [disabled]='isScrolling' style="padding-left:20px;padding-top:0;padding-bottom:15px;padding-right:0px;" min="5" snaps="true" max="100"
step="1" (ngModelChange)="changeBrewRating()" [(ngModel)]="settings.brew_rating">
step="1" (ngModelChange)="changeBrewRating()" (ionBlur)="changedBrewRatingBlur()" [(ngModel)]="settings.brew_rating">
<div class='ion-label' slot="end">{{settings.brew_rating}}</div>
</ion-range>

Expand Down Expand Up @@ -196,7 +196,7 @@ <h2>{{"PAGE_SETTINGS_BEAN_RATING" | translate}}</h2>
</ion-item>
<ion-item style="top:-10px;" lines="none">
<ion-range [disabled]='isScrolling' style="padding-left:20px;padding-top:0;padding-bottom:15px;padding-right:0px;" min="5" snaps="true" max="100"
step="1" (ngModelChange)="changeBeanRating()" [(ngModel)]="settings.bean_rating">
step="1" (ngModelChange)="changeBeanRating()" (ionBlur)="changeBeanRatingBlur()" [(ngModel)]="settings.bean_rating">
<div class='ion-label' slot="end">{{settings.bean_rating}}</div>
</ion-range>

Expand Down
6 changes: 6 additions & 0 deletions src/app/settings/settings.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,9 @@ export class SettingsPage {
// #379 - First save then reset filter ;)
await this.saveSettings();
this.settings.resetFilter();
}

public async changedBrewRatingBlur() {
setTimeout(() => {
const newRating = this.settings.brew_rating;

Expand All @@ -424,6 +427,9 @@ export class SettingsPage {
public async changeBeanRating() {
await this.saveSettings();
this.settings.resetFilter();
}

public async changeBeanRatingBlur() {
setTimeout(() => {
const newRating = this.settings.bean_rating;

Expand Down

0 comments on commit d8840c6

Please sign in to comment.