Change getVersionSuccess reducer
This commit is contained in:
parent
54693bb158
commit
61981a927b
|
@ -82,7 +82,7 @@ const dashboard = handleActions(
|
||||||
[actions.getVersionSuccess]: (state, { payload }) => {
|
[actions.getVersionSuccess]: (state, { payload }) => {
|
||||||
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
|
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion;
|
||||||
|
|
||||||
if (payload && isVersionGreater(currentVersion, payload.new_version)) {
|
if (!payload.disabled && isVersionGreater(currentVersion, payload.new_version)) {
|
||||||
const {
|
const {
|
||||||
announcement_url: announcementUrl,
|
announcement_url: announcementUrl,
|
||||||
new_version: newVersion,
|
new_version: newVersion,
|
||||||
|
@ -96,7 +96,7 @@ const dashboard = handleActions(
|
||||||
canAutoUpdate,
|
canAutoUpdate,
|
||||||
isUpdateAvailable: true,
|
isUpdateAvailable: true,
|
||||||
processingVersion: false,
|
processingVersion: false,
|
||||||
checkUpdateFlag: !!payload,
|
checkUpdateFlag: !payload.disabled,
|
||||||
};
|
};
|
||||||
return newState;
|
return newState;
|
||||||
}
|
}
|
||||||
|
@ -104,6 +104,7 @@ const dashboard = handleActions(
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
processingVersion: false,
|
processingVersion: false,
|
||||||
|
checkUpdateFlag: !payload.disabled,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue