diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a52ed57b..3678db79c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,7 +48,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). ### Fixed * 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 diff --git a/package.json b/package.json index fa5d5a862..5a6e0741a 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "formik": "^0.10.4", "hast-util-sanitize": "^1.1.2", "keytar": "^4.2.1", - "lbry-redux": "lbryio/lbry-redux#b4fffe863df316bc73183567ab978221ee623b8c", + "lbry-redux": "lbryio/lbry-redux#83fec2a8419cbf0f1fafdc98a50dab3051191ef5", "localforage": "^1.7.1", "mammoth": "^1.4.6", "mime": "^2.3.1", diff --git a/src/renderer/redux/actions/app.js b/src/renderer/redux/actions/app.js index 5e212e9f9..d3d5a56f7 100644 --- a/src/renderer/redux/actions/app.js +++ b/src/renderer/redux/actions/app.js @@ -27,6 +27,7 @@ import { selectUpgradeFilename, selectAutoUpdateDeclined, selectRemoteVersion, + selectUpgradeTimer, } from 'redux/selectors/app'; 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() { return dispatch => { dispatch({ @@ -149,11 +163,15 @@ export function doAutoUpdate() { id: MODALS.AUTO_UPDATE_DOWNLOADED, }) ); + + dispatch(doClearUpgradeTimer()); }; } export function doAutoUpdateDeclined() { return dispatch => { + dispatch(doClearUpgradeTimer()); + dispatch({ type: ACTIONS.AUTO_UPDATE_DECLINED, }); diff --git a/src/renderer/redux/reducers/app.js b/src/renderer/redux/reducers/app.js index c66ae24b3..2aa59f98d 100644 --- a/src/renderer/redux/reducers/app.js +++ b/src/renderer/redux/reducers/app.js @@ -184,6 +184,11 @@ reducers[ACTIONS.HISTORY_NAVIGATE] = state => modalProps: {}, }); +reducers[ACTIONS.CLEAR_UPGRADE_TIMER] = state => + Object.assign({}, state, { + checkUpgradeTimer: undefined, + }); + export default function reducer(state: AppState = defaultState, action: any) { const handler = reducers[action.type]; if (handler) return handler(state, action); diff --git a/src/renderer/redux/selectors/app.js b/src/renderer/redux/selectors/app.js index 98b97f755..bcce68504 100644 --- a/src/renderer/redux/selectors/app.js +++ b/src/renderer/redux/selectors/app.js @@ -84,3 +84,5 @@ export const selectCurrentLanguage = createSelector( ); export const selectVolume = createSelector(selectState, state => state.volume); + +export const selectUpgradeTimer = createSelector(selectState, state => state.checkUpgradeTimer);