@upeex/ads-sdk 1.1.27 → 1.1.29

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -93,6 +93,8 @@ function AdBanner({ client, slot, baseUrl = 'https://app.upeex.com.br/ad', theme
93
93
  const [modalVisible, setModalVisible] = useState(false);
94
94
  const [canClose, setCanClose] = useState(false);
95
95
  const progressAnim = useRef(new Animated.Value(0)).current;
96
+ // Ensures the popup is shown only once — refreshes update the ad silently
97
+ const hasShownPopup = useRef(false);
96
98
  const log = (...args) => {
97
99
  if (debug)
98
100
  console.log('[UPEEX ADS]', ...args);
@@ -135,7 +137,8 @@ function AdBanner({ client, slot, baseUrl = 'https://app.upeex.com.br/ad', theme
135
137
  }
136
138
  setAd(data);
137
139
  setError(null);
138
- if (isPopup) {
140
+ if (isPopup && !hasShownPopup.current) {
141
+ hasShownPopup.current = true;
139
142
  setModalVisible(true);
140
143
  }
141
144
  if (data.refresh && data.refresh > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upeex/ads-sdk",
3
- "version": "1.1.27",
3
+ "version": "1.1.29",
4
4
  "description": "Upeex Ads SDK for React Native and universal apps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",