-
-
Notifications
You must be signed in to change notification settings - Fork 827
Better support for inviting multiple people #403
Conversation
Pasting a list of addresses into the box will now pop up a dialog to confirm and show you the success / failure state of each address. It will also not die if it gets rate limited. Fixes element-hq/element-web#1713
} | ||
} | ||
}).finally(function() { | ||
self.setState({ |
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.
this looks redundant? it will be done by the finally
?
Duplicated in `finally`
We now set them in the constructor
So that we can sensibly track the number completed by taking the length of it.
And make it actually cancel the process.
ptal |
@@ -41,20 +42,28 @@ export default class MultiInviteDialog extends React.Component { | |||
} | |||
} | |||
|
|||
componentWillUnmount() { | |||
this._unmounted = true; |
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.
should we also be setting _canceled
here? What happens if the user closes the dialog without clicking 'cancel'? I'm a bit confused about the difference between _unmounted
and _canceled
, and why we handle them differently in _inviteMore
. Perhaps some comments would help?
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.
Point - it should definitely cancel if you dismiss the dialog so I've just made them the same variable.
Instead of both that and _unmounted
lgtm except for the build failure |
Pasting a list of addresses into the box will now pop up a dialog to confirm and show you the success / failure state of each address. It will also not die if it gets rate limited.
Fixes element-hq/element-web#1713
Requires: element-hq/element-web#1942