mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 10:09:59 +00:00
Remove disabled action state entirely
This commit is contained in:
@@ -47,7 +47,7 @@ export default new (class extends TypedEventTarget<EventMap> {
|
||||
async refresh() {
|
||||
this.bridgePort?.disconnect();
|
||||
|
||||
updateActionState(ActionState.Disabled);
|
||||
updateActionState(ActionState.Default);
|
||||
|
||||
try {
|
||||
this.bridgeInfo = await bridge.getInfo();
|
||||
@@ -69,14 +69,6 @@ export default new (class extends TypedEventTarget<EventMap> {
|
||||
}
|
||||
}
|
||||
|
||||
private updateAction() {
|
||||
if (this.receiverDevices.size > 0) {
|
||||
updateActionState(ActionState.Default);
|
||||
} else {
|
||||
updateActionState(ActionState.Disabled);
|
||||
}
|
||||
}
|
||||
|
||||
getBridgeInfo() {
|
||||
return this.bridgeInfo;
|
||||
}
|
||||
@@ -154,8 +146,6 @@ export default new (class extends TypedEventTarget<EventMap> {
|
||||
})
|
||||
);
|
||||
|
||||
this.updateAction();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -171,8 +161,6 @@ export default new (class extends TypedEventTarget<EventMap> {
|
||||
})
|
||||
);
|
||||
|
||||
this.updateAction();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user