Skip to content

Commit 3fa8460

Browse files
authored
Merge pull request element-hq#3598 from vector-im/dbkr/clear_cache_button_electron
Make the clear cache button work on desktop
2 parents a1cb566 + 7f6d9a6 commit 3fa8460

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎src/vector/platform/ElectronPlatform.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,8 @@ export default class ElectronPlatform extends VectorBasePlatform {
139139
requestNotificationPermission() : Promise {
140140
return q('granted');
141141
}
142+
143+
reload() {
144+
electron.remote.getCurrentWebContents().reload();
145+
}
142146
}

‎src/vector/platform/WebPlatform.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,10 @@ export default class WebPlatform extends VectorBasePlatform {
206206
}
207207
return null;
208208
}
209+
210+
reload() {
211+
// forceReload=false since we don't really need new HTML/JS files
212+
// we just need to restart the JS runtime.
213+
window.location.reload(false);
214+
}
209215
}

0 commit comments

Comments
 (0)