-
-
Notifications
You must be signed in to change notification settings - Fork 832
Conversation
This deletes the IndexedDB database and reloads the page. This solely exists as a get-out clause for users in case the indexedDB instance gets corrupted. Hopefully we won't ever need to point users to it.
@@ -418,6 +418,14 @@ module.exports = React.createClass({ | |||
Modal.createDialog(BugReportDialog, {}); | |||
}, | |||
|
|||
_onClearCacheClicked: function() { | |||
MatrixClientPeg.get().store.deleteAllData().then(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.done?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. 8d6c3cd
return <div> | ||
<h3>Clear Cache</h3> | ||
<div className="mx_UserSettings_section"> | ||
<AccessibleButton className="mx_UserSettings_button danger" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How dangerous is it to go alone clear the cache?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You made a Zelda reference! /me swoons
It's deleting data, which I think is dangerous, and it will cause a long resync potentially which is bad. I don't have any strong feelings either way.
<div className="mx_UserSettings_section"> | ||
<AccessibleButton className="mx_UserSettings_button danger" | ||
onClick={this._onClearCacheClicked}> | ||
Clear Cache (triggers page refresh) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about, "Clear Cache and Reload"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. 8d6c3cd
This deletes the IndexedDB database and reloads the page.
This solely exists as a get-out clause for users in case the indexedDB instance
gets corrupted. Hopefully we won't ever need to point users to it.