Clear upgrade subscribed interval after declining
This commit is contained in:
parent
42a3759cc0
commit
7119a43742
2 changed files with 10 additions and 1 deletions
|
@ -27,6 +27,7 @@ import {
|
|||
selectUpgradeFilename,
|
||||
selectAutoUpdateDeclined,
|
||||
selectRemoteVersion,
|
||||
selectUpgradeTimer,
|
||||
} from 'redux/selectors/app';
|
||||
import { lbrySettings as config } from 'package.json';
|
||||
|
||||
|
@ -153,7 +154,13 @@ export function doAutoUpdate() {
|
|||
}
|
||||
|
||||
export function doAutoUpdateDeclined() {
|
||||
return dispatch => {
|
||||
return (dispatch, getState) => {
|
||||
const state = getState();
|
||||
|
||||
if (selectUpgradeTimer(state)) {
|
||||
clearInterval(selectUpgradeTimer(state));
|
||||
}
|
||||
|
||||
dispatch({
|
||||
type: ACTIONS.AUTO_UPDATE_DECLINED,
|
||||
});
|
||||
|
|
|
@ -84,3 +84,5 @@ export const selectCurrentLanguage = createSelector(
|
|||
);
|
||||
|
||||
export const selectVolume = createSelector(selectState, state => state.volume);
|
||||
|
||||
export const selectUpgradeTimer = createSelector(selectState, state => state.checkUpgradeTimer);
|
||||
|
|
Loading…
Add table
Reference in a new issue