diff --git a/packages/desktop-client/src/components/accounts/Account.tsx b/packages/desktop-client/src/components/accounts/Account.tsx index d3f39dce71e..05e30623b77 100644 --- a/packages/desktop-client/src/components/accounts/Account.tsx +++ b/packages/desktop-client/src/components/accounts/Account.tsx @@ -1357,6 +1357,18 @@ class AccountInternal extends PureComponent< onApplyFilter = async (conditionOrSavedFilter: ConditionEntity) => { let filterConditions = this.state.filterConditions; + + if ( + 'customName' in conditionOrSavedFilter && + conditionOrSavedFilter.customName + ) { + filterConditions = filterConditions.filter( + c => + !isTransactionFilterEntity(c) && + c.customName !== conditionOrSavedFilter.customName, + ); + } + if (isTransactionFilterEntity(conditionOrSavedFilter)) { // A saved filter was passed in. const savedFilter = conditionOrSavedFilter; @@ -1366,12 +1378,6 @@ class AccountInternal extends PureComponent< this.setState({ filterConditionsOp: savedFilter.conditionsOp }); this.applyFilters([...savedFilter.conditions]); } else { - filterConditions = filterConditions.filter( - c => - !isTransactionFilterEntity(c) && - c.customName !== conditionOrSavedFilter.customName, - ); - // A condition was passed in. const condition = conditionOrSavedFilter; this.setState({ diff --git a/upcoming-release-notes/3441.md b/upcoming-release-notes/3441.md new file mode 100644 index 00000000000..fbcac7b5a06 --- /dev/null +++ b/upcoming-release-notes/3441.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [MatisJanis] +--- + +Fix account filters being overridden.