mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-12 18:39:58 +00:00
Fix popup button disabled state
This commit is contained in:
@@ -339,8 +339,9 @@ class ReceiverEntry extends Component<ReceiverEntryProps, ReceiverEntryState> {
|
|||||||
</div>
|
</div>
|
||||||
<button className="button receiver__connect"
|
<button className="button receiver__connect"
|
||||||
onClick={ this.handleCast }
|
onClick={ this.handleCast }
|
||||||
disabled={ (application && application.isIdleScreen)
|
disabled={ this.state.showAlternateAction
|
||||||
?? (this.props.isLoading || !this.props.canCast) }>
|
? !application || application.isIdleScreen
|
||||||
|
: this.props.isLoading || !this.props.canCast }>
|
||||||
{ this.state.isLoading
|
{ this.state.isLoading
|
||||||
? _("popupCastingButtonTitle"
|
? _("popupCastingButtonTitle"
|
||||||
, (this.state.isLoading
|
, (this.state.isLoading
|
||||||
@@ -362,7 +363,7 @@ class ReceiverEntry extends Component<ReceiverEntryProps, ReceiverEntryState> {
|
|||||||
|
|
||||||
const application = status.applications?.[0];
|
const application = status.applications?.[0];
|
||||||
|
|
||||||
if (!application?.isIdleScreen && this.state.showAlternateAction) {
|
if (this.state.showAlternateAction) {
|
||||||
this.props.onStop(this.props.receiver);
|
this.props.onStop(this.props.receiver);
|
||||||
} else {
|
} else {
|
||||||
this.props.onCast(this.props.receiver);
|
this.props.onCast(this.props.receiver);
|
||||||
|
|||||||
Reference in New Issue
Block a user