Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions kahuna/public/js/search/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the feature switch to bypass this new block restored the Back to search behaviour.

// 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);

Expand Down Expand Up @@ -318,7 +321,7 @@ query.controller('SearchQueryCtrl', [
}

ctrl.sortProps = {
onSortSelect: updateSortChips,
onSelect: updateSortChips,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using bi-section,
reverting this line restored the logo click behaviour.

No idea why this is effective.
It could be something todo with the path into watchSearchChange been somehow bound to the state of the sort control?

query: $stateParams.query,
orderBy: ctrl.ordering ? ctrl.ordering.orderBy : ""
};
Expand Down
Loading