TagSpaces is an offline, open source, document manager with tagging support
fix: removing the max search results from the search query after editing
Ilian Sapundshiev1d8fe9f92dff
diff --git a/src/renderer/reducers/searches.ts b/src/renderer/reducers/searches.tsindex d41045018..2be012dbc 100644--- a/src/renderer/reducers/searches.ts+++ b/src/renderer/reducers/searches.ts@@ -47,12 +47,14 @@ export default (state: Array<TS.SearchQuery> = initialState, action: any) => {);if (indexForEditing >= 0) {+ // Strip maxSearchResults — it's a UI/settings cap, not part of the+ // saved query (mirrors ADD_SEARCH). Without this, re-saving an+ // existing stored search pins it to whatever cap was active at edit+ // time and ignores later changes to the global setting.+ const { maxSearchResults, ...search } = action.search;return [...state.slice(0, indexForEditing),- {- // ...state[indexForEditing],- ...action.search,- },+ { ...search },...state.slice(indexForEditing + 1),];}