From 2d0dfe5ea719e2254d4323ee217046fd5a235e3e Mon Sep 17 00:00:00 2001 From: Tony McCrae Date: Tue, 3 Mar 2026 19:10:41 +0000 Subject: [PATCH] Post PR4475 fixes. Fixes Free to use only check-box is cleared on Back to search Fixes Free to use only check-box sticks on icon click. --- kahuna/public/js/search/query.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/kahuna/public/js/search/query.js b/kahuna/public/js/search/query.js index 72c85bf4c5..3900656b85 100644 --- a/kahuna/public/js/search/query.js +++ b/kahuna/public/js/search/query.js @@ -246,8 +246,11 @@ query.controller('SearchQueryCtrl', [ // eslint-disable-next-line complexity function watchSearchChange(newFilter, sender) { let showPaid = newFilter.nonFree ? newFilter.nonFree : false; - if (sender && sender == "filterChange" && !newFilter.nonFree) { - showPaid = ctrl.user.permissions.showPaid; + if (ctrl.usePermissionsFilter) { + // Fixes Free to use only check-box is cleared on Back to search + if (sender && sender === "filterChange" && !newFilter.nonFree) { + showPaid = ctrl.user.permissions.showPaid; + } } storage.setJs("isNonFree", showPaid, true); @@ -318,7 +321,7 @@ query.controller('SearchQueryCtrl', [ } ctrl.sortProps = { - onSortSelect: updateSortChips, + onSelect: updateSortChips, query: $stateParams.query, orderBy: ctrl.ordering ? ctrl.ordering.orderBy : "" };