From 853bf2cfe748c78cd1b1ad2291c6a0a766d1dd57 Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Wed, 17 Jan 2018 07:10:45 -0500 Subject: [PATCH] Make video pause when you hit the "Upgrade Now" button on Mac/Win --- build/build.sh | 6 +++--- src/renderer/redux/actions/app.js | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/build/build.sh b/build/build.sh index 1ace2ad48..2619fb5b0 100755 --- a/build/build.sh +++ b/build/build.sh @@ -73,9 +73,9 @@ fi # Build the app # ################### if [ "$FULL_BUILD" == "true" ]; then - if $OSX; then - security unlock-keychain -p ${KEYCHAIN_PASSWORD} osx-build.keychain - fi + # if $OSX; then + # security unlock-keychain -p ${KEYCHAIN_PASSWORD} osx-build.keychain + # fi yarn build diff --git a/src/renderer/redux/actions/app.js b/src/renderer/redux/actions/app.js index 45d99b364..955516749 100644 --- a/src/renderer/redux/actions/app.js +++ b/src/renderer/redux/actions/app.js @@ -10,6 +10,8 @@ import { doAuthNavigate } from 'redux/actions/navigation'; import { doFetchDaemonSettings } from 'redux/actions/settings'; import { doAuthenticate } from 'redux/actions/user'; import { doBalanceSubscribe } from 'redux/actions/wallet'; +import { doPause } from "redux/actions/media"; + import { selectCurrentModal, selectIsUpgradeSkipped, @@ -76,6 +78,10 @@ export function doDownloadUpgradeRequested() { return (dispatch, getState) => { const state = getState(); + + // Pause video if needed + dispatch(doPause()); + const autoUpdateDeclined = selectAutoUpdateDeclined(state); if (['win32', 'darwin'].includes(process.platform)) { // electron-updater behavior