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

Commit a0b338e

Browse files
committed
Merge remote-tracking branch 'origin/develop' into release-v0.8.7
2 parents 46b362b + b8d5f97 commit a0b338e

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/BasePlatform.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,12 @@ export default class BasePlatform {
8282
screenCaptureErrorString() {
8383
return "Not implemented";
8484
}
85+
86+
/**
87+
* Restarts the application, without neccessarily reloading
88+
* any application code
89+
*/
90+
reload() {
91+
throw new Error("reload not implemented!");
92+
}
8593
}

src/components/structures/UserSettings.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,11 @@ module.exports = React.createClass({
441441
},
442442

443443
_onClearCacheClicked: function() {
444+
if (!PlatformPeg.get()) return;
445+
446+
MatrixClientPeg.get().stopClient();
444447
MatrixClientPeg.get().store.deleteAllData().done(() => {
445-
// forceReload=false since we don't really need new HTML/JS files
446-
// we just need to restart the JS runtime.
447-
window.location.reload(false);
448+
PlatformPeg.get().reload();
448449
});
449450
},
450451

0 commit comments

Comments
 (0)