react-native-ble-manager 11.0.7 → 11.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,6 +20,11 @@ def safeExtGet(prop, fallback) {
20
20
  }
21
21
 
22
22
  android {
23
+ def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
24
+ if (agpVersion.tokenize('.')[0].toInteger() >= 7) {
25
+ namespace "it.innove"
26
+ }
27
+
23
28
  compileSdk safeExtGet("compileSdk", 33)
24
29
 
25
30
  compileOptions {
@@ -51,4 +56,4 @@ repositories {
51
56
  dependencies {
52
57
  implementation "com.facebook.react:react-native:+"
53
58
  // implementation "org.jetbrains.trove4j: trove4j: 20160824"
54
- }
59
+ }
@@ -111,14 +111,9 @@ class BleManager: RCTEventEmitter, CBCentralManagerDelegate, CBPeripheralDelegat
111
111
  // Helper method to insert callback in different queues
112
112
  func insertCallback(_ callback: @escaping RCTResponseSenderBlock, intoDictionary dictionary: inout Dictionary<String, [RCTResponseSenderBlock]>, withKey key: String) {
113
113
  serialQueue.sync {
114
- if var peripheralCallbacks = dictionary[key] {
115
- peripheralCallbacks.append(callback)
116
- } else {
117
- var peripheralCallbacks = [RCTResponseSenderBlock]()
118
- peripheralCallbacks.append(callback)
119
- dictionary[key] = peripheralCallbacks
120
- }
121
-
114
+ var peripheralCallbacks = dictionary[key] ?? [RCTResponseSenderBlock]()
115
+ peripheralCallbacks.append(callback)
116
+ dictionary[key] = peripheralCallbacks
122
117
  }
123
118
  }
124
119
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ble-manager",
3
- "version": "11.0.7",
3
+ "version": "11.0.8",
4
4
  "description": "A BLE module for react native.",
5
5
  "repository": {
6
6
  "type": "git",