Skip to content

Commit

Permalink
Merge pull request #3768 from mozilla/fix/safari-mic-dialog
Browse files Browse the repository at this point in the history
Show safari mic modal if mic permissions denied
  • Loading branch information
robertlong authored Jan 26, 2021
2 parents 4033fe7 + e453ddc commit 8553e13
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/react-components/ui-root.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,6 @@ class UIRoot extends Component {
constructor(props) {
super(props);

if (props.showSafariMicDialog) {
this.state.dialog = <SafariMicModal />;
}

props.mediaSearchStore.setHistory(props.history);

// An exit handler that discards event arguments and can be cleaned up.
Expand Down Expand Up @@ -954,9 +950,17 @@ class UIRoot extends Component {
);
}

if (this.props.showSafariMicDialog) {
return (
<div className={classNames(rootStyles)}>
<RoomLayoutContainer scene={this.props.scene} store={this.props.store} modal={<SafariMicModal />} />
</div>
);
}

const preload = this.props.showPreload;

const isLoading = !preload && !this.state.hideLoader && !this.props.showSafariMicDialog;
const isLoading = !preload && !this.state.hideLoader;

if (isLoading && this.state.showPrefs) {
return (
Expand Down

0 comments on commit 8553e13

Please sign in to comment.