Merge: - client: Fix delay of custom filter editor
Merge in DNS/adguard-home from fix/1657 to master Fix #1657 * commit '474306d46546097700d5c767c7283f33f63f53d7': - client: Fix delay of custom filter editor
This commit is contained in:
commit
0818d51493
|
@ -571,10 +571,10 @@ export const toggleBlocking = (
|
||||||
const matchPreparedUnblockingRule = userRules.match(preparedUnblockingRule);
|
const matchPreparedUnblockingRule = userRules.match(preparedUnblockingRule);
|
||||||
|
|
||||||
if (matchPreparedBlockingRule) {
|
if (matchPreparedBlockingRule) {
|
||||||
dispatch(setRules(userRules.replace(`${blockingRule}`, '')));
|
await dispatch(setRules(userRules.replace(`${blockingRule}`, '')));
|
||||||
dispatch(addSuccessToast(i18next.t('rule_removed_from_custom_filtering_toast', { rule: blockingRule })));
|
dispatch(addSuccessToast(i18next.t('rule_removed_from_custom_filtering_toast', { rule: blockingRule })));
|
||||||
} else if (!matchPreparedUnblockingRule) {
|
} else if (!matchPreparedUnblockingRule) {
|
||||||
dispatch(setRules(`${userRules}${lineEnding}${unblockingRule}\n`));
|
await dispatch(setRules(`${userRules}${lineEnding}${unblockingRule}\n`));
|
||||||
dispatch(addSuccessToast(i18next.t('rule_added_to_custom_filtering_toast', { rule: unblockingRule })));
|
dispatch(addSuccessToast(i18next.t('rule_added_to_custom_filtering_toast', { rule: unblockingRule })));
|
||||||
} else if (matchPreparedUnblockingRule) {
|
} else if (matchPreparedUnblockingRule) {
|
||||||
dispatch(addSuccessToast(i18next.t('rule_added_to_custom_filtering_toast', { rule: unblockingRule })));
|
dispatch(addSuccessToast(i18next.t('rule_added_to_custom_filtering_toast', { rule: unblockingRule })));
|
||||||
|
|
|
@ -84,7 +84,9 @@ const ClientCell = ({
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClick = () => dispatch(toggleBlocking(buttonType, domain));
|
const onClick = async () => {
|
||||||
|
await dispatch(toggleBlocking(buttonType, domain));
|
||||||
|
};
|
||||||
|
|
||||||
const getOptions = (optionToActionMap) => {
|
const getOptions = (optionToActionMap) => {
|
||||||
const options = Object.entries(optionToActionMap);
|
const options = Object.entries(optionToActionMap);
|
||||||
|
|
Loading…
Reference in New Issue