cordova-admob-tomitank 1.2.5 → 1.2.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cordova-admob-tomitank",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "Trustable Google AdMob Cordova Plugin",
5
5
  "main": "lib/index.js",
6
6
  "module": "esm/index.js",
package/plugin.xml CHANGED
@@ -1,5 +1,5 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
- <plugin id="cordova-admob-tomitank" version="1.2.5"
2
+ <plugin id="cordova-admob-tomitank" version="1.2.6"
3
3
  xmlns="http://apache.org/cordova/ns/plugins/1.0"
4
4
  xmlns:android="http://schemas.android.com/apk/res/android">
5
5
  <name>cordova-admob-tomitank</name>
@@ -150,7 +150,13 @@ class AMBBanner: AMBAdBase, BannerViewDelegate, AdSizeDelegate {
150
150
  }
151
151
 
152
152
  deinit {
153
- cleanupBanner()
153
+ if bannerView != nil {
154
+ bannerView.delegate = nil
155
+ bannerView.adSizeDelegate = nil
156
+ Self.stackView.removeArrangedSubview(placeholder)
157
+ bannerView.removeFromSuperview()
158
+ bannerView = nil
159
+ }
154
160
  }
155
161
 
156
162
  override func isLoaded() -> Bool {
@@ -158,7 +164,6 @@ class AMBBanner: AMBAdBase, BannerViewDelegate, AdSizeDelegate {
158
164
  }
159
165
 
160
166
  override func load(_ ctx: AMBContext) {
161
- cleanupBanner() // Hack: restart when was loaded!
162
167
  if bannerView == nil {
163
168
  bannerView = BannerView(adSize: self.adSize)
164
169
  bannerView.delegate = self
@@ -212,17 +217,6 @@ class AMBBanner: AMBAdBase, BannerViewDelegate, AdSizeDelegate {
212
217
  ctx.resolve()
213
218
  }
214
219
 
215
-
216
- func cleanupBanner() {
217
- if bannerView != nil {
218
- bannerView.delegate = nil
219
- bannerView.adSizeDelegate = nil
220
- Self.stackView.removeArrangedSubview(placeholder)
221
- bannerView.removeFromSuperview()
222
- bannerView = nil
223
- }
224
- }
225
-
226
220
  func bannerViewDidReceiveAd(_ bannerView: BannerView) {
227
221
  self.emit(AMBEvents.adLoad, [
228
222
  "size": [