Skip to content

Commit

Permalink
🔀 Merge pull request #1123 from Lissy93/FIX/most-used-last-used-counter
Browse files Browse the repository at this point in the history
[FIX] Counter for most-used + last-used, and lint warns
Fixes #1056 and #1033 for @hypatia1 and @Zixim
  • Loading branch information
Lissy93 authored Feb 26, 2023
2 parents e48f841 + 4fc3abf commit d5b70c1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/Widgets/Clock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default {
return !this.options.hideSeconds;
},
use12Hour() {
if (typeof this.options.use12Hour === "boolean") return this.options.use12Hour;
if (typeof this.options.use12Hour === 'boolean') return this.options.use12Hour;
// this is the default, it gets computed by the DateTimeFormat implementation
return Intl.DateTimeFormat(this.timeFormat, { timeZone: this.timeZone, hour: 'numeric' }).resolvedOptions().hour12 ?? false;
},
Expand Down
6 changes: 3 additions & 3 deletions src/components/Widgets/Mvg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
:class="{cancelled: departure.cancelled}">{{ departure.destination }}</div>
<span class="delay"
:class="{'has-delay': departure.realtimeDepartureTime > departure.plannedDepartureTime}"
>{{ Math.max(0,
>{{ Math.max(0,
(departure.realtimeDepartureTime - departure.plannedDepartureTime)/60000) }}</span>
<span class="occupancy"
:class="'occupancy-' + departure.occupancy"
Expand Down Expand Up @@ -131,9 +131,9 @@ export default {
filter_results(value) {
if (!this.options.filters) return true;
let useEntry = (
(!this.options.filters.line)
(!this.options.filters.line)
|| this.ensure_array(this.options.filters.line).includes(value.label)
);
);
useEntry = useEntry
&& (
(!this.options.filters.product)
Expand Down
4 changes: 2 additions & 2 deletions src/mixins/ItemMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ export default {
this.$emit('itemClicked');
// Update the most/ last used ledger, for smart-sorting
if (!this.appConfig.disableSmartSort) {
this.incrementMostUsedCount(this.id);
this.incrementLastUsedCount(this.id);
this.incrementMostUsedCount(this.item.id);
this.incrementLastUsedCount(this.item.id);
}
},
/* Open item, using specified method */
Expand Down

0 comments on commit d5b70c1

Please sign in to comment.