Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #798 from matrix-org/dbkr/clear_cache_button_electron
Browse files Browse the repository at this point in the history
Make the clear cache button work on desktop
  • Loading branch information
dbkr authored Apr 10, 2017
2 parents 7578737 + 811cd79 commit 95dfbc5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions src/BasePlatform.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,12 @@ export default class BasePlatform {
screenCaptureErrorString() {
return "Not implemented";
}

/**
* Restarts the application, without neccessarily reloading
* any application code
*/
reload() {
throw new Error("reload not implemented!");
}
}
6 changes: 3 additions & 3 deletions src/components/structures/UserSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,10 @@ module.exports = React.createClass({
},

_onClearCacheClicked: function() {
if (!PlatformPeg.get()) return;

MatrixClientPeg.get().store.deleteAllData().done(() => {
// forceReload=false since we don't really need new HTML/JS files
// we just need to restart the JS runtime.
window.location.reload(false);
PlatformPeg.get().reload();
});
},

Expand Down

0 comments on commit 95dfbc5

Please sign in to comment.