mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-01 19:18:28 -04:00
bluetooth: add soft rfkill unblock, wait for adapter to become available
instead of forfeiting subscription fixes #2922 fixes #1537
This commit is contained in:
@@ -335,6 +335,7 @@ Singleton {
|
||||
const data = response.result.data;
|
||||
|
||||
if (service === "server") {
|
||||
const prevCapabilities = capabilities;
|
||||
apiVersion = data.apiVersion || 0;
|
||||
cliVersion = data.cliVersion || "";
|
||||
capabilities = data.capabilities || [];
|
||||
@@ -346,6 +347,12 @@ Singleton {
|
||||
}
|
||||
|
||||
capabilitiesReceived();
|
||||
|
||||
const capabilitiesChanged = prevCapabilities.length !== capabilities.length || capabilities.some(c => !prevCapabilities.includes(c));
|
||||
if (prevCapabilities.length > 0 && capabilitiesChanged) {
|
||||
log.info("Capabilities changed, resubscribing");
|
||||
subscribe(activeSubscriptions);
|
||||
}
|
||||
} else if (service === "network") {
|
||||
networkStateUpdate(data);
|
||||
} else if (service === "network.credentials") {
|
||||
|
||||
Reference in New Issue
Block a user