Skip to content

Commit

Permalink
fix(android): remove unnecessary context arg in native module constru…
Browse files Browse the repository at this point in the history
…ctors
  • Loading branch information
wjaykim committed Jan 23, 2025
1 parent f44c27e commit 185ef85
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ import com.facebook.react.viewmanagers.RNGoogleMobileAdsMediaViewManagerDelegate
import com.facebook.react.viewmanagers.RNGoogleMobileAdsMediaViewManagerInterface

@ReactModule(name = ReactNativeGoogleMobileAdsMediaViewManager.NAME)
class ReactNativeGoogleMobileAdsMediaViewManager(
reactContext: ReactApplicationContext
) : ViewGroupManager<ReactNativeGoogleMobileAdsMediaView>(reactContext),
class ReactNativeGoogleMobileAdsMediaViewManager : ViewGroupManager<ReactNativeGoogleMobileAdsMediaView>(),
RNGoogleMobileAdsMediaViewManagerInterface<ReactNativeGoogleMobileAdsMediaView> {
private val delegate: ViewManagerDelegate<ReactNativeGoogleMobileAdsMediaView> = RNGoogleMobileAdsMediaViewManagerDelegate(this)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package io.invertase.googlemobileads
*/

import android.view.View
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.ReactMethod
import com.facebook.react.module.annotations.ReactModule
import com.facebook.react.uimanager.ThemedReactContext
Expand All @@ -29,9 +28,7 @@ import com.facebook.react.viewmanagers.RNGoogleMobileAdsNativeViewManagerDelegat
import com.facebook.react.viewmanagers.RNGoogleMobileAdsNativeViewManagerInterface

@ReactModule(name = ReactNativeGoogleMobileAdsNativeAdViewManager.NAME)
class ReactNativeGoogleMobileAdsNativeAdViewManager(
reactContext: ReactApplicationContext
) : ViewGroupManager<ReactNativeGoogleMobileAdsNativeAdView>(reactContext),
class ReactNativeGoogleMobileAdsNativeAdViewManager : ViewGroupManager<ReactNativeGoogleMobileAdsNativeAdView>(),
RNGoogleMobileAdsNativeViewManagerInterface<ReactNativeGoogleMobileAdsNativeAdView> {
private val delegate: ViewManagerDelegate<ReactNativeGoogleMobileAdsNativeAdView> = RNGoogleMobileAdsNativeViewManagerDelegate(this)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import com.google.android.gms.ads.VideoOptions
import com.google.android.gms.ads.nativead.NativeAd
import com.google.android.gms.ads.nativead.NativeAdOptions

@ReactModule(ReactNativeGoogleMobileAdsNativeModule.NAME)
@ReactModule(name = ReactNativeGoogleMobileAdsNativeModule.NAME)
class ReactNativeGoogleMobileAdsNativeModule(
reactContext: ReactApplicationContext
) : NativeGoogleMobileAdsNativeModuleSpec(reactContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class ReactNativeGoogleMobileAdsPackage : TurboReactPackage() {
): List<ViewManager<*, *>> {
return listOf(
ReactNativeGoogleMobileAdsBannerAdViewManager(),
ReactNativeGoogleMobileAdsNativeAdViewManager(reactContext),
ReactNativeGoogleMobileAdsMediaViewManager(reactContext)
ReactNativeGoogleMobileAdsNativeAdViewManager(),
ReactNativeGoogleMobileAdsMediaViewManager()
)
}

Expand Down

0 comments on commit 185ef85

Please sign in to comment.