Skip to content

Commit 59823de

Browse files
TomTascheclaude
andcommitted
Fix Pro users seeing upgrade prompts
Pro users were incorrectly seeing payment prompts because BillingManager initialization would return early when enabled=false, skipping the Pro flavor check. This left billingPreferences=null, causing hasPurchased() to return false. Moved Pro flavor handling before the enabled check to ensure Pro users always get ads removed regardless of billing manager state. Fixes user reports of "app keeps trying to force another payment" in Pro version. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ca1b929 commit 59823de

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

app/src/main/java/at/tomtasche/reader/nonfree/BillingManager.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ public class BillingManager {
1616
public void initialize(Context context, AnalyticsManager analyticsManager, AdManager adManager) {
1717
this.adManager = adManager;
1818

19+
// Handle Pro flavor first, regardless of enabled state
20+
if (BuildConfig.FLAVOR.equals("pro")) {
21+
adManager.removeAds();
22+
return;
23+
}
24+
1925
if (!enabled) {
2026
adManager.showGoogleAds();
21-
2227
return;
2328
}
2429

2530
billingPreferences = new BillingPreferences(context);
26-
27-
if (BuildConfig.FLAVOR.equals("pro")) {
28-
billingPreferences.setPurchased(true);
29-
}
30-
3131
enforceAds();
3232
}
3333

0 commit comments

Comments
 (0)