react-native-firework-sdk 2.16.1 → 2.16.2
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/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWVideoFeedManager.kt
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
package com.fireworksdk.bridge.reactnative.manager
|
|
2
2
|
|
|
3
|
-
import android.app.Activity
|
|
4
3
|
import com.facebook.react.bridge.ReadableArray
|
|
5
4
|
import com.facebook.react.bridge.ReadableMap
|
|
6
5
|
import com.facebook.react.uimanager.SimpleViewManager
|
|
@@ -38,7 +37,8 @@ class FWVideoFeedManager : SimpleViewManager<FWVideoFeed>() {
|
|
|
38
37
|
|
|
39
38
|
override fun createViewInstance(reactContext: ThemedReactContext): FWVideoFeed {
|
|
40
39
|
this.reactContext = reactContext
|
|
41
|
-
|
|
40
|
+
// MS-1250: Fix potential crash when reactContext.currentActivity is null
|
|
41
|
+
videoFeed = FWVideoFeed(reactContext.currentActivity ?: reactContext)
|
|
42
42
|
addVideoFeedListener(reactContext, videoFeed)
|
|
43
43
|
return videoFeed
|
|
44
44
|
}
|
|
@@ -236,7 +236,7 @@ class FWVideoFeedManager : SimpleViewManager<FWVideoFeed>() {
|
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
|
|
239
|
-
|
|
239
|
+
override fun getCommandsMap(): MutableMap<String, Int> {
|
|
240
240
|
val map: MutableMap<String, Int> = HashMap()
|
|
241
241
|
map["refresh"] = COMMAND_REFRESH
|
|
242
242
|
return map
|