Adds option for user to disable smart-sort

This commit is contained in:
Alicia Sykes 2021-09-05 01:01:45 +01:00
parent 11f5f8c9df
commit 591b03420b
1 changed files with 5 additions and 2 deletions

View File

@ -53,6 +53,7 @@ import { localStorageKeys } from '@/utils/defaults';
export default {
name: 'Item',
inject: ['config'],
props: {
id: String, // The unique ID of a tile (e.g. 001)
title: String, // The main text of tile, required
@ -108,8 +109,10 @@ export default {
this.$emit('itemClicked');
}
// Update the most/ last used ledger, for smart-sorting
this.incrementMostUsedCount(this.id);
this.incrementLastUsedCount(this.id);
if (!this.config.appConfig.disableSmartSort) {
this.incrementMostUsedCount(this.id);
this.incrementLastUsedCount(this.id);
}
},
/* Open custom context menu, and set position */
openContextMenu(e) {