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

Make the clear cache button work on desktop #798

Merged
merged 1 commit into from
Apr 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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