Commit eaf37c65 authored by Gordon Martin's avatar Gordon Martin

Bump to bluetooth modules versions which do not emit anything if bluetooth is not enabled

until it is re-enabled.

This required a change to the bluetooth$ driver to take this into account.
parent 738a4225
......@@ -19336,8 +19336,7 @@
},
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"optional": true
"bundled": true
},
"aproba": {
"version": "1.2.0",
......@@ -19355,13 +19354,11 @@
},
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"optional": true
"bundled": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -19374,18 +19371,15 @@
},
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"optional": true
"bundled": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"optional": true
"bundled": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"optional": true
"bundled": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -19488,8 +19482,7 @@
},
"inherits": {
"version": "2.0.3",
"bundled": true,
"optional": true
"bundled": true
},
"ini": {
"version": "1.3.5",
......@@ -19499,7 +19492,6 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -19512,20 +19504,17 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
"bundled": true,
"optional": true
"bundled": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
......@@ -19542,7 +19531,6 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -19621,8 +19609,7 @@
},
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"optional": true
"bundled": true
},
"object-assign": {
"version": "4.1.1",
......@@ -19632,7 +19619,6 @@
"once": {
"version": "1.4.0",
"bundled": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -19708,8 +19694,7 @@
},
"safe-buffer": {
"version": "5.1.1",
"bundled": true,
"optional": true
"bundled": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -19739,7 +19724,6 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -19757,7 +19741,6 @@
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -19796,13 +19779,11 @@
},
"wrappy": {
"version": "1.0.2",
"bundled": true,
"optional": true
"bundled": true
},
"yallist": {
"version": "3.0.2",
"bundled": true,
"optional": true
"bundled": true
}
}
},
......@@ -24025,9 +24006,9 @@
"integrity": "sha512-oqoCt6iZHWAdpCjG9JAQO1/1IQJgC7sjVKSzD+84sFpd/vwUlnQcE9pJbXoOME0tvG2nacMs/WtprfeocbFCKg=="
},
"react-native-bluetooth-socket-bridge": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/react-native-bluetooth-socket-bridge/-/react-native-bluetooth-socket-bridge-1.0.11.tgz",
"integrity": "sha512-lUfDTr4IbHE4yV738TenQkZ4mhOWY99jQDeQkGLourzxoCHXVmtHAwrxkwFcV0wh88+0tG585eFtUbOEVtaTuQ=="
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/react-native-bluetooth-socket-bridge/-/react-native-bluetooth-socket-bridge-1.1.0.tgz",
"integrity": "sha512-Vzglm6FIsb1TtBtwKamiqEmQzeIBDqoLfeXSs3UDEV9kNmK0evGnpIOaA0e4hzA8JbFjDuJD+eT8cNXhA9CHig=="
},
"react-native-bluetooth-status": {
"version": "1.3.0",
......@@ -1456,8 +1456,7 @@
},
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"optional": true
"bundled": true
},
"aproba": {
"version": "1.2.0",
......@@ -1822,8 +1821,7 @@
},
"safe-buffer": {
"version": "5.1.1",
"bundled": true,
"optional": true
"bundled": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -1871,7 +1869,6 @@
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -1910,13 +1907,11 @@
},
"wrappy": {
"version": "1.0.2",
"bundled": true,
"optional": true
"bundled": true
},
"yallist": {
"version": "3.0.2",
"bundled": true,
"optional": true
"bundled": true
}
}
},
......@@ -5482,9 +5477,9 @@
}
},
"ssb-mobile-bluetooth-manager": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/ssb-mobile-bluetooth-manager/-/ssb-mobile-bluetooth-manager-3.0.2.tgz",
"integrity": "sha512-9EOORxRMPDw10SascjAdkL35pL7T4h5qHUpW3g0zWDYoJlx84jkAAO7VcZbXUBlAZRZbUMu8VSdX4uH6APwBXg==",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/ssb-mobile-bluetooth-manager/-/ssb-mobile-bluetooth-manager-3.1.0.tgz",
"integrity": "sha512-x5/YBv0yMOeJyP7P6AcFqJPFmkIJOUkN94uFt8yz6P294lO3UI+VFDyM/9sTVBc223eais6lZRSBPRh4PRDFlQ==",
"requires": {
"debug": "^4.1.1",
"pull-json-doubleline": "^2.0.0",
......
......@@ -31,7 +31,7 @@
"ssb-ebt": "5.2.7",
"ssb-friends": "3.1.9",
"ssb-keys": "7.1.3",
"ssb-mobile-bluetooth-manager": "3.0.2",
"ssb-mobile-bluetooth-manager": "3.1.0",
"ssb-private": "0.2.3",
"ssb-query": "2.3.0",
"ssb-serve-blobs": "2.0.0",
......
......@@ -291,30 +291,21 @@ export class SSBSource {
boolean
> = api.sbot.obs.bluetoothEnabled[0]();
const bluetoothNearby$: Stream<Array<BTPeer>> = bluetoothEnabled$
.map(
bluetoothEnabled =>
bluetoothEnabled
? xsFromPullStream(
api.sbot.pull.nearbyBluetoothPeers[0](1000),
).replaceError(err =>
xsFromPullStream(
api.sbot.pull.nearbyBluetoothPeers[0](1000),
),
)
: xs.never(),
)
.flatten()
.map((result: any) => result.discovered);
const bluetoothNearby$: Stream<Array<BTPeer>> = xsFromPullStream(
api.sbot.pull.nearbyBluetoothPeers[0](1000),
).map((result: any) => result.discovered);
const bluetoothConnected$ = this.peers$.map(peers =>
peers.filter(p => (p.source as any) === 'bt'),
);
const bluetooth$ = xs
.combine(bluetoothNearby$, bluetoothConnected$)
.map(([nearbys, connecteds]) =>
nearbys.filter(btPeer => btPeerNotYetConnected(btPeer, connecteds)),
.combine(bluetoothEnabled$, bluetoothNearby$, bluetoothConnected$)
.map(([enabled, nearbys, connecteds]) =>
// If bluetooth is disabled, bluetoothNearby$ does not emit anything until it is enabled again,
// so we use the 'enabled' boolean to stop peers being displayed which were on the list just
// before bluetooth was disabled.
nearbys.filter(btPeer => enabled && btPeerNotYetConnected(btPeer, connecteds)),
)
.map(btPeers => btPeers.map(btPeerToStagedPeerMetadata));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment