mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-03-14 22:48:35 +03:00
Change getVersionSuccess reducer
This commit is contained in:
parent
54693bb158
commit
61981a927b
1 changed files with 3 additions and 2 deletions
|
@ -82,7 +82,7 @@ const dashboard = handleActions(
|
|||
[actions.getVersionSuccess]: (state, { payload }) => {
|
||||
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
|
||||
|
||||
if (payload && isVersionGreater(currentVersion, payload.new_version)) {
|
||||
if (!payload.disabled && isVersionGreater(currentVersion, payload.new_version)) {
|
||||
const {
|
||||
announcement_url: announcementUrl,
|
||||
new_version: newVersion,
|
||||
|
@ -96,7 +96,7 @@ const dashboard = handleActions(
|
|||
canAutoUpdate,
|
||||
isUpdateAvailable: true,
|
||||
processingVersion: false,
|
||||
checkUpdateFlag: !!payload,
|
||||
checkUpdateFlag: !payload.disabled,
|
||||
};
|
||||
return newState;
|
||||
}
|
||||
|
@ -104,6 +104,7 @@ const dashboard = handleActions(
|
|||
return {
|
||||
...state,
|
||||
processingVersion: false,
|
||||
checkUpdateFlag: !payload.disabled,
|
||||
};
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue