Revert "s/.done(/.then(/ since modern es6 track unhandled promise exceptions"
This reverts commit 09a8fec2
This commit is contained in:
parent
09a8fec261
commit
168b1b68bb
43 changed files with 72 additions and 74 deletions
|
@ -112,7 +112,7 @@ module.exports = createReactClass({
|
|||
}
|
||||
});
|
||||
|
||||
httpPromise.then(function() {
|
||||
httpPromise.done(function() {
|
||||
self.setState({
|
||||
phase: self.Phases.Display,
|
||||
avatarUrl: MatrixClientPeg.get().mxcUrlToHttp(newUrl),
|
||||
|
|
|
@ -174,7 +174,7 @@ module.exports = createReactClass({
|
|||
newPassword: "",
|
||||
newPasswordConfirm: "",
|
||||
});
|
||||
}).then();
|
||||
}).done();
|
||||
},
|
||||
|
||||
_optionallySetEmail: function() {
|
||||
|
|
|
@ -52,7 +52,7 @@ export default class DevicesPanel extends React.Component {
|
|||
}
|
||||
|
||||
_loadDevices() {
|
||||
MatrixClientPeg.get().getDevices().then(
|
||||
MatrixClientPeg.get().getDevices().done(
|
||||
(resp) => {
|
||||
if (this._unmounted) { return; }
|
||||
this.setState({devices: resp.devices || []});
|
||||
|
|
|
@ -97,7 +97,7 @@ module.exports = createReactClass({
|
|||
phase: this.phases.LOADING,
|
||||
});
|
||||
|
||||
MatrixClientPeg.get().setPushRuleEnabled('global', self.state.masterPushRule.kind, self.state.masterPushRule.rule_id, !checked).then(function() {
|
||||
MatrixClientPeg.get().setPushRuleEnabled('global', self.state.masterPushRule.kind, self.state.masterPushRule.rule_id, !checked).done(function() {
|
||||
self._refreshFromServer();
|
||||
});
|
||||
},
|
||||
|
@ -170,7 +170,7 @@ module.exports = createReactClass({
|
|||
emailPusher.kind = null;
|
||||
emailPusherPromise = MatrixClientPeg.get().setPusher(emailPusher);
|
||||
}
|
||||
emailPusherPromise.then(() => {
|
||||
emailPusherPromise.done(() => {
|
||||
this._refreshFromServer();
|
||||
}, (error) => {
|
||||
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||
|
@ -274,7 +274,7 @@ module.exports = createReactClass({
|
|||
}
|
||||
}
|
||||
|
||||
Promise.all(deferreds).then(function() {
|
||||
Promise.all(deferreds).done(function() {
|
||||
self._refreshFromServer();
|
||||
}, function(error) {
|
||||
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||
|
@ -343,7 +343,7 @@ module.exports = createReactClass({
|
|||
}
|
||||
}
|
||||
|
||||
Promise.all(deferreds).then(function(resps) {
|
||||
Promise.all(deferreds).done(function(resps) {
|
||||
self._refreshFromServer();
|
||||
}, function(error) {
|
||||
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||
|
@ -398,7 +398,7 @@ module.exports = createReactClass({
|
|||
};
|
||||
|
||||
// Then, add the new ones
|
||||
Promise.all(removeDeferreds).then(function(resps) {
|
||||
Promise.all(removeDeferreds).done(function(resps) {
|
||||
const deferreds = [];
|
||||
|
||||
let pushRuleVectorStateKind = self.state.vectorContentRules.vectorState;
|
||||
|
@ -434,7 +434,7 @@ module.exports = createReactClass({
|
|||
}
|
||||
}
|
||||
|
||||
Promise.all(deferreds).then(function(resps) {
|
||||
Promise.all(deferreds).done(function(resps) {
|
||||
self._refreshFromServer();
|
||||
}, onError);
|
||||
}, onError);
|
||||
|
@ -650,7 +650,7 @@ module.exports = createReactClass({
|
|||
externalContentRules: self.state.externalContentRules,
|
||||
externalPushRules: self.state.externalPushRules,
|
||||
});
|
||||
}).then();
|
||||
}).done();
|
||||
|
||||
MatrixClientPeg.get().getThreePids().then((r) => this.setState({threepids: r.threepids}));
|
||||
},
|
||||
|
|
|
@ -75,7 +75,7 @@ export default class HelpUserSettingsTab extends React.Component {
|
|||
// stopping in the middle of the logs.
|
||||
console.log("Clear cache & reload clicked");
|
||||
MatrixClientPeg.get().stopClient();
|
||||
MatrixClientPeg.get().store.deleteAllData().then(() => {
|
||||
MatrixClientPeg.get().store.deleteAllData().done(() => {
|
||||
PlatformPeg.get().reload();
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue