From 591b03420b45c4320d73ed0db8a9bc00650aa319 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 5 Sep 2021 01:01:45 +0100 Subject: [PATCH] :sparkles: Adds option for user to disable smart-sort --- src/components/LinkItems/Item.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/LinkItems/Item.vue b/src/components/LinkItems/Item.vue index 8249815a..8572592c 100644 --- a/src/components/LinkItems/Item.vue +++ b/src/components/LinkItems/Item.vue @@ -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) {