Manual fixup for remaining q incantaions

* don't try to use `finally` as a static method
* work around absence of `allSettled`
This commit is contained in:
Richard van der Hoff 2017-07-12 15:15:59 +01:00
parent 0d7cc59d99
commit 33f330d434
3 changed files with 27 additions and 17 deletions

View file

@ -568,15 +568,16 @@ module.exports = React.createClass({
});
// reject the invites
const promises = rooms.map((room) => {
return MatrixClientPeg.get().leave(room.roomId);
return MatrixClientPeg.get().leave(room.roomId).catch((e) => {
// purposefully drop errors to the floor: we'll just have a non-zero number on the UI
// after trying to reject all the invites.
});
});
// purposefully drop errors to the floor: we'll just have a non-zero number on the UI
// after trying to reject all the invites.
q.allSettled(promises).then(() => {
Promise.all(promises).then(() => {
this.setState({
rejectingInvites: false,
});
}).done();
});
},
_onExportE2eKeysClicked: function() {