Skip to content

Commit

Permalink
Improved: click bahaviour on the scrolling animation toggle(#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Jan 20, 2025
1 parent b270b1f commit 37e4729
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
</ion-card-content>

<ion-item lines="none">
<ion-toggle label-placement="start" :checked="isScrollingAnimationEnabled" @click.prevent="updateScrollingAnimationPreference()">{{ translate("Enable animation") }}</ion-toggle>
<ion-toggle label-placement="start" v-model="isScrollingAnimationEnabled" @click.prevent="updateScrollingAnimationPreference($event)">{{ translate("Enable animation") }}</ion-toggle>
</ion-item>
</ion-card>
</section>
Expand Down Expand Up @@ -208,7 +208,9 @@ async function setProductStore(event: any) {
await store.dispatch("user/updateCurrentProductStore", productStore)
}
function updateScrollingAnimationPreference() {
function updateScrollingAnimationPreference(event: any) {
event.stopImmediatePropagation();
store.dispatch("user/updateScrollingAnimationPreference", !isScrollingAnimationEnabled.value)
}
Expand Down

0 comments on commit 37e4729

Please sign in to comment.