@applicaster/quick-brick-native-apple 6.2.1 → 6.2.3
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.
- package/apple/QuickBrickApple.podspec.json +2 -2
- package/apple/tvos/Helpers/FocusableGroupManager/FocusableGroupManager.swift +16 -0
- package/apple/tvos/Views/FocusableGroupView/FocusableGroupView.swift +10 -0
- package/apple/tvos/Views/FocusableView/FocusableView.swift +10 -0
- package/apple/universal/ReactNative/ReactNativeCommunicationModule.swift +3 -1
- package/apple/universal/ReactNative/ReactNativeManager.swift +4 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "QuickBrickApple",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.3",
|
|
4
4
|
"platforms": {
|
|
5
5
|
"ios": "14.0",
|
|
6
6
|
"tvos": "14.0"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"authors": "Applicaster LTD.",
|
|
17
17
|
"source": {
|
|
18
18
|
"git": "https://github.com/applicaster/Zapp-Frameworks.git",
|
|
19
|
-
"tag": "@@applicaster/quick-brick-native-apple/6.2.
|
|
19
|
+
"tag": "@@applicaster/quick-brick-native-apple/6.2.3"
|
|
20
20
|
},
|
|
21
21
|
"requires_arc": true,
|
|
22
22
|
"source_files": "universal/**/*.{m,swift}",
|
|
@@ -30,12 +30,28 @@ class FocusableGroupManager {
|
|
|
30
30
|
if let itemsGroup = itemsGroups[groupId] {
|
|
31
31
|
newItemsGroup = itemsGroup
|
|
32
32
|
}
|
|
33
|
+
|
|
33
34
|
newItemsGroup[itemId] = item
|
|
34
35
|
itemsGroups[groupId] = newItemsGroup
|
|
35
36
|
notifyGroupView(groupID: groupId)
|
|
36
37
|
return true
|
|
37
38
|
}
|
|
38
39
|
|
|
40
|
+
class func unregisterFusableItem(itemId: String, groupId: String) {
|
|
41
|
+
var newItemsGroup: [String: FocusableView] = [:]
|
|
42
|
+
if let itemsGroup = itemsGroups[groupId] {
|
|
43
|
+
newItemsGroup = itemsGroup
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
newItemsGroup[itemId] = nil
|
|
47
|
+
itemsGroups[groupId] = newItemsGroup
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
class func unregisterFusableGroup(itemId: String) {
|
|
51
|
+
itemsGroups[itemId] = nil
|
|
52
|
+
focusableGroups[itemId] = nil
|
|
53
|
+
}
|
|
54
|
+
|
|
39
55
|
/// Register FocusableGroup at storage
|
|
40
56
|
///
|
|
41
57
|
/// - Parameter item: FocusableGroup instance
|
|
@@ -79,6 +79,16 @@ public class FocusableGroupView: RCTTVView {
|
|
|
79
79
|
/// Note: In case Initial init when app start not calling shouldFocusUpdate
|
|
80
80
|
var isGroupWasFocusedByUser = false
|
|
81
81
|
|
|
82
|
+
override public func removeFromSuperview() {
|
|
83
|
+
super.removeFromSuperview()
|
|
84
|
+
guard let itemId else {
|
|
85
|
+
return
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Removing when react native releases the view
|
|
89
|
+
FocusableGroupManager.unregisterFusableGroup(itemId: itemId)
|
|
90
|
+
}
|
|
91
|
+
|
|
82
92
|
/// View connected to GroupView was updated
|
|
83
93
|
///
|
|
84
94
|
/// - Parameter groupItems: dictionary connected to group view
|
|
@@ -71,6 +71,16 @@ public class FocusableView: ParallaxView {
|
|
|
71
71
|
// }
|
|
72
72
|
// }
|
|
73
73
|
|
|
74
|
+
override public func removeFromSuperview() {
|
|
75
|
+
super.removeFromSuperview()
|
|
76
|
+
guard let itemId, let groupId else {
|
|
77
|
+
return
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Removing when react native releases the view
|
|
81
|
+
FocusableGroupManager.unregisterFusableItem(itemId: itemId, groupId: groupId)
|
|
82
|
+
}
|
|
83
|
+
|
|
74
84
|
func addFocusGuideIfNeeded(tag: NSNumber?,
|
|
75
85
|
direction: UIRectEdge) {
|
|
76
86
|
if let tag,
|
|
@@ -85,6 +85,8 @@ enum Events: String {
|
|
|
85
85
|
func setPrefersHomeIndicatorAutoHidden(_ payload: [String: Any])
|
|
86
86
|
|
|
87
87
|
func forceAppReload()
|
|
88
|
+
|
|
89
|
+
func forceAppReloadLanguageSwitch()
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
@objc(QuickBrickCommunicationModule)
|
|
@@ -169,7 +171,7 @@ class ReactNativeCommunicationModule: NSObject, RCTBridgeModule {
|
|
|
169
171
|
ReactNativeCommunicationModuleError.unableToSaveToLocalStorage, nil)
|
|
170
172
|
}
|
|
171
173
|
|
|
172
|
-
delegateManager.
|
|
174
|
+
delegateManager.forceAppReloadLanguageSwitch()
|
|
173
175
|
}
|
|
174
176
|
}
|
|
175
177
|
}
|
|
@@ -223,4 +223,8 @@ extension ReactNativeManager: QuickBrickManagerDelegate {
|
|
|
223
223
|
public func forceAppReload() {
|
|
224
224
|
EventsBus.post(EventsBus.Event(type: EventsBusType(.forceAppReload)))
|
|
225
225
|
}
|
|
226
|
+
|
|
227
|
+
public func forceAppReloadLanguageSwitch() {
|
|
228
|
+
EventsBus.post(EventsBus.Event(type: EventsBusType(.forceAppReloadLanguageSwitch)))
|
|
229
|
+
}
|
|
226
230
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/quick-brick-native-apple",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.3",
|
|
4
4
|
"description": "iOS and tvOS native code for QuickBrick applications. This package is used to provide native logic for QuickBrick",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|