🔀 Merge pull request #1123 from Lissy93/FIX/most-used-last-used-counter

[FIX] Counter for most-used + last-used, and lint warns
Fixes #1056 and #1033 for @hypatia1 and @Zixim
This commit is contained in:
Alicia Sykes 2023-02-26 14:25:40 +00:00 committed by GitHub
commit d5b70c1d94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -40,7 +40,7 @@ export default {
return !this.options.hideSeconds; return !this.options.hideSeconds;
}, },
use12Hour() { 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 // this is the default, it gets computed by the DateTimeFormat implementation
return Intl.DateTimeFormat(this.timeFormat, { timeZone: this.timeZone, hour: 'numeric' }).resolvedOptions().hour12 ?? false; return Intl.DateTimeFormat(this.timeFormat, { timeZone: this.timeZone, hour: 'numeric' }).resolvedOptions().hour12 ?? false;
}, },

View File

@ -157,8 +157,8 @@ export default {
this.$emit('itemClicked'); this.$emit('itemClicked');
// Update the most/ last used ledger, for smart-sorting // Update the most/ last used ledger, for smart-sorting
if (!this.appConfig.disableSmartSort) { if (!this.appConfig.disableSmartSort) {
this.incrementMostUsedCount(this.id); this.incrementMostUsedCount(this.item.id);
this.incrementLastUsedCount(this.id); this.incrementLastUsedCount(this.item.id);
} }
}, },
/* Open item, using specified method */ /* Open item, using specified method */