diff --git a/ui/js/actions/app.js b/ui/js/actions/app.js index 0ccc6a977..a784ddef2 100644 --- a/ui/js/actions/app.js +++ b/ui/js/actions/app.js @@ -200,11 +200,22 @@ export function doRemoveSnackBarSnack() { export function doClearCache() { return function(dispatch, getState) { window.cacheStore.purge(); - + dispatch(doFetchFileInfosAndPublishedClaims()); return Promise.resolve(); }; } +export function doReloadCurrentPage() { + return function(dispatch, getState) { + const currentPage = remote.getCurrentWindow(); + if (currentPage) { + dispatch(doClearCache()).then(() => { + currentPage.reload(); + }); + } + }; +} + export function doQuit() { return function(dispatch, getState) { remote.app.quit(); diff --git a/ui/js/component/header/index.js b/ui/js/component/header/index.js index 08d5bb9cb..e0c57cfd3 100644 --- a/ui/js/component/header/index.js +++ b/ui/js/component/header/index.js @@ -6,6 +6,7 @@ import { selectIsForwardDisabled, } from "selectors/navigation"; import { selectBalance } from "selectors/wallet"; +import { doReloadCurrentPage } from "actions/app"; import { doNavigate, doHistoryBack, @@ -24,6 +25,7 @@ const perform = dispatch => ({ navigate: path => dispatch(doNavigate(path)), back: () => dispatch(doHistoryBack()), forward: () => dispatch(doHistoryForward()), + reload: () => dispatch(doReloadCurrentPage()), }); export default connect(select, perform)(Header); diff --git a/ui/js/component/header/view.jsx b/ui/js/component/header/view.jsx index 89f6df923..48ba7b3ee 100644 --- a/ui/js/component/header/view.jsx +++ b/ui/js/component/header/view.jsx @@ -11,6 +11,7 @@ export const Header = props => { isForwardDisabled, navigate, publish, + reload, } = props; return (