Show an error dialog if poll creation or voting fails (#7201)

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Andy Balaam 2021-11-25 17:00:13 +00:00 committed by GitHub
parent c8765821b5
commit 965539da2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 56 additions and 7 deletions

View file

@ -216,9 +216,17 @@ class PollButton extends React.PureComponent<IPollButtonProps> {
description: _t("You do not have permission to start polls in this room."),
});
} else {
Modal.createTrackedDialog('Polls', 'create', PollCreateDialog, {
room: this.props.room,
}, 'mx_CompoundDialog');
Modal.createTrackedDialog(
'Polls',
'create',
PollCreateDialog,
{
room: this.props.room,
},
'mx_CompoundDialog',
false, // isPriorityModal
true, // isStaticModal
);
}
};