Skip to content

Commit

Permalink
Update android/src/main/java/com/theoplayer/ads/AdsModule.kt
Browse files Browse the repository at this point in the history
Co-authored-by: Philipp Mikheyev <[email protected]>
  • Loading branch information
tvanlaerhoven and kot331107 committed Oct 30, 2024
1 parent 6c52bd3 commit c2566d0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions android/src/main/java/com/theoplayer/ads/AdsModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,13 @@ class AdsModule(context: ReactApplicationContext) : ReactContextBaseJavaModule(c
purpose: OmidFriendlyObstructionPurpose?,
reason: String?
) {
if (obsView != null && purpose != null) {
viewResolver.resolveViewByTag(tag) { view: ReactTHEOplayerView? ->
view?.player?.ads?.omid?.addFriendlyObstruction(
OmidFriendlyObstruction(obsView, purpose, reason)
)
}
if (obsView == null || purpose == null) {
return
}
viewResolver.resolveViewByTag(tag) { view: ReactTHEOplayerView? ->
view?.player?.ads?.omid?.addFriendlyObstruction(
OmidFriendlyObstruction(obsView, purpose, reason)
)
}
}

Expand Down

0 comments on commit c2566d0

Please sign in to comment.