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