Merge pull request #1857 from doniyor2109/master
Clear upgrade subscribed interval after declining
This commit is contained in:
commit
f62181dbd6
5 changed files with 29 additions and 2 deletions
|
@ -48,7 +48,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
* Edit option missing from certain published claims ([#1756](https://github.com/lbryio/lbry-desktop/issues/1756))
|
* Edit option missing from certain published claims ([#1756](https://github.com/lbryio/lbry-desktop/issues/1756))
|
||||||
* Fix navigation issue with channels that have more than one page ([#1797](https://github.com/lbryio/lbry-desktop/pull/1797))
|
* Navigation issue with channels that have more than one page ([#1797](https://github.com/lbryio/lbry-desktop/pull/1797))
|
||||||
|
* Navigation issue with channels that have more than one page ([#1797](https://github.com/lbryio/lbry-desktop/pull/1797))
|
||||||
|
* Upgrade modals would stack on-top of each other if the app was kept open for a long time ([#1857](https://github.com/lbryio/lbry-desktop/pull/1857))
|
||||||
|
|
||||||
|
|
||||||
## [0.22.2] - 2018-07-09
|
## [0.22.2] - 2018-07-09
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
"formik": "^0.10.4",
|
"formik": "^0.10.4",
|
||||||
"hast-util-sanitize": "^1.1.2",
|
"hast-util-sanitize": "^1.1.2",
|
||||||
"keytar": "^4.2.1",
|
"keytar": "^4.2.1",
|
||||||
"lbry-redux": "lbryio/lbry-redux#b4fffe863df316bc73183567ab978221ee623b8c",
|
"lbry-redux": "lbryio/lbry-redux#83fec2a8419cbf0f1fafdc98a50dab3051191ef5",
|
||||||
"localforage": "^1.7.1",
|
"localforage": "^1.7.1",
|
||||||
"mammoth": "^1.4.6",
|
"mammoth": "^1.4.6",
|
||||||
"mime": "^2.3.1",
|
"mime": "^2.3.1",
|
||||||
|
|
|
@ -27,6 +27,7 @@ import {
|
||||||
selectUpgradeFilename,
|
selectUpgradeFilename,
|
||||||
selectAutoUpdateDeclined,
|
selectAutoUpdateDeclined,
|
||||||
selectRemoteVersion,
|
selectRemoteVersion,
|
||||||
|
selectUpgradeTimer,
|
||||||
} from 'redux/selectors/app';
|
} from 'redux/selectors/app';
|
||||||
import { lbrySettings as config } from 'package.json';
|
import { lbrySettings as config } from 'package.json';
|
||||||
|
|
||||||
|
@ -138,6 +139,19 @@ export function doDownloadUpgradeRequested() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function doClearUpgradeTimer() {
|
||||||
|
return (dispatch, getState) => {
|
||||||
|
const state = getState();
|
||||||
|
|
||||||
|
if (selectUpgradeTimer(state)) {
|
||||||
|
clearInterval(selectUpgradeTimer(state));
|
||||||
|
dispatch({
|
||||||
|
type: ACTIONS.CLEAR_UPGRADE_TIMER,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export function doAutoUpdate() {
|
export function doAutoUpdate() {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
|
@ -149,11 +163,15 @@ export function doAutoUpdate() {
|
||||||
id: MODALS.AUTO_UPDATE_DOWNLOADED,
|
id: MODALS.AUTO_UPDATE_DOWNLOADED,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
dispatch(doClearUpgradeTimer());
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doAutoUpdateDeclined() {
|
export function doAutoUpdateDeclined() {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
|
dispatch(doClearUpgradeTimer());
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.AUTO_UPDATE_DECLINED,
|
type: ACTIONS.AUTO_UPDATE_DECLINED,
|
||||||
});
|
});
|
||||||
|
|
|
@ -184,6 +184,11 @@ reducers[ACTIONS.HISTORY_NAVIGATE] = state =>
|
||||||
modalProps: {},
|
modalProps: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
reducers[ACTIONS.CLEAR_UPGRADE_TIMER] = state =>
|
||||||
|
Object.assign({}, state, {
|
||||||
|
checkUpgradeTimer: undefined,
|
||||||
|
});
|
||||||
|
|
||||||
export default function reducer(state: AppState = defaultState, action: any) {
|
export default function reducer(state: AppState = defaultState, action: any) {
|
||||||
const handler = reducers[action.type];
|
const handler = reducers[action.type];
|
||||||
if (handler) return handler(state, action);
|
if (handler) return handler(state, action);
|
||||||
|
|
|
@ -84,3 +84,5 @@ export const selectCurrentLanguage = createSelector(
|
||||||
);
|
);
|
||||||
|
|
||||||
export const selectVolume = createSelector(selectState, state => state.volume);
|
export const selectVolume = createSelector(selectState, state => state.volume);
|
||||||
|
|
||||||
|
export const selectUpgradeTimer = createSelector(selectState, state => state.checkUpgradeTimer);
|
||||||
|
|
Loading…
Add table
Reference in a new issue