@cardsjd/portal 0.1.5 → 0.1.7

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.
@@ -170,7 +170,7 @@ export class AdMobPortal extends BasePortal {
170
170
  let readyToShowAd = false;
171
171
 
172
172
  //reset timer
173
- if (this.lastShownInterstitial === null) {
173
+ if (!this.lastShownInterstitial) {
174
174
  this.lastShownInterstitial = Date.now();//now
175
175
  //add start offset delay
176
176
  const newDate = new Date();
package/lib/BasePortal.js CHANGED
@@ -50,7 +50,10 @@ export class BasePortal {
50
50
 
51
51
  createShortCut() { }
52
52
 
53
- async tryShowInterstitialAd(options) {
53
+ async tryShowInterstitialAd(_options) {
54
+
55
+ }
56
+ async showAppOpenAdWithMaxDelay(_maxDelay) {
54
57
 
55
58
  }
56
59
  }
@@ -273,7 +273,7 @@ async tryShowInterstitialAd(options) {
273
273
  let readyToShowAd = false;
274
274
 
275
275
  //reset timer
276
- if (this.lastShownInterstitial === null) {
276
+ if (!this.lastShownInterstitial) {
277
277
  this.lastShownInterstitial = Date.now();//now
278
278
  //add start offset delay
279
279
  const newDate = new Date();
@@ -244,7 +244,7 @@ async tryShowInterstitialAd(options) {
244
244
  let readyToShowAd = false;
245
245
 
246
246
  //reset timer
247
- if (this.lastShownInterstitial === null) {
247
+ if (!this.lastShownInterstitial) {
248
248
  this.lastShownInterstitial = Date.now();//now
249
249
  //add start offset delay
250
250
  const newDate = new Date();
@@ -80,7 +80,7 @@ async tryShowInterstitialAd(options) {
80
80
  let readyToShowAd = false;
81
81
 
82
82
  //reset timer
83
- if (this.lastShownInterstitial === null) {
83
+ if (!this.lastShownInterstitial) {
84
84
  this.lastShownInterstitial = Date.now();//now
85
85
  //add start offset delay
86
86
  const newDate = new Date();
package/lib/PokiPortal.js CHANGED
@@ -202,7 +202,7 @@ async tryShowInterstitialAd(options) {
202
202
  let readyToShowAd = false;
203
203
 
204
204
  //reset timer
205
- if (this.lastShownInterstitial === null) {
205
+ if (!this.lastShownInterstitial) {
206
206
  this.lastShownInterstitial = Date.now();//now
207
207
  //add start offset delay
208
208
  const newDate = new Date();
package/lib/WebPortal.js CHANGED
@@ -48,6 +48,10 @@ export class WebPortal extends BasePortal {
48
48
  // ----- Ad methods -----
49
49
 
50
50
  async setupAds() {
51
+ if (this.isSetup) {
52
+ console.log('CapacitorAdmob is already setup');
53
+ return;
54
+ }
51
55
  if (this.isSetupLoading) {
52
56
  throw Error('GoogleH5 setup is in progress already');
53
57
  }
@@ -135,7 +139,7 @@ export class WebPortal extends BasePortal {
135
139
  let readyToShowAd = false;
136
140
 
137
141
  //reset timer
138
- if (this.lastShownInterstitial === null) {
142
+ if (!this.lastShownInterstitial) {
139
143
  this.lastShownInterstitial = Date.now();//now
140
144
  //add start offset delay
141
145
  const newDate = new Date();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cardsjd/portal",
3
3
  "private": false,
4
- "version": "0.1.5",
4
+ "version": "0.1.7",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "publishConfig": {