Enhance freemium#639
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR removes deferred restore-outcome persistence and observer wiring, replacing it with immediate dialog display after restorePurchases. RestoreOutcome-to-DialogFragment mapping is simplified to a direct when-expression. Shared-preference getters/setters and the RestoreOutcomeDialogObserver were deleted. Subscription lifecycle callbacks were changed from "upgraded to lifetime" to "activated first time", the CancelSubscriptionReminderDialog and its layout were removed, and an inline cancel-subscription hint plus a typed activity helper were added. BaseActivity.showDialog now guards against illegal fragment commits. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (1 warning, 2 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@presentation/src/main/java/org/cryptomator/presentation/ui/layout/LicenseContentViewBinder.kt`:
- Around line 97-107: The restore dialog is shown unconditionally which can
crash if the FragmentManager state is already saved; update
LicenseContentViewBinder.showRestoreOutcome to guard before calling
BaseActivity.showDialog by checking activity.supportFragmentManager.isStateSaved
(and return early if true) or delegate to a safe helper that checks
isStateSaved/isDestroyed/isFinishing; reference the method
LicenseContentViewBinder.showRestoreOutcome and BaseActivity.showDialog and
ensure you only call dialog.show(supportFragmentManager, ACTIVE_DIALOG) when
supportFragmentManager.isStateSaved is false.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 370ba23c-ab11-42a4-9d33-a62e60444acd
📒 Files selected for processing (11)
presentation/src/main/java/org/cryptomator/presentation/CryptomatorApp.ktpresentation/src/main/java/org/cryptomator/presentation/licensing/LicenseStateOrchestrator.ktpresentation/src/main/java/org/cryptomator/presentation/service/RestoreOutcome.ktpresentation/src/main/java/org/cryptomator/presentation/service/RestoreOutcomeDialogObserver.ktpresentation/src/main/java/org/cryptomator/presentation/ui/activity/LicenseCheckActivity.ktpresentation/src/main/java/org/cryptomator/presentation/ui/dialog/CancelSubscriptionReminderDialog.ktpresentation/src/main/java/org/cryptomator/presentation/ui/fragment/WelcomeLicenseFragment.ktpresentation/src/main/java/org/cryptomator/presentation/ui/layout/LicenseContentViewBinder.ktpresentation/src/main/res/layout/dialog_cancel_subscription_reminder.xmlpresentation/src/main/res/values/strings.xmlutil/src/main/java/org/cryptomator/util/SharedPreferencesHandler.kt
💤 Files with no reviewable changes (7)
- presentation/src/main/res/layout/dialog_cancel_subscription_reminder.xml
- presentation/src/main/java/org/cryptomator/presentation/ui/dialog/CancelSubscriptionReminderDialog.kt
- presentation/src/main/java/org/cryptomator/presentation/licensing/LicenseStateOrchestrator.kt
- presentation/src/main/java/org/cryptomator/presentation/ui/activity/LicenseCheckActivity.kt
- presentation/src/main/java/org/cryptomator/presentation/service/RestoreOutcomeDialogObserver.kt
- presentation/src/main/java/org/cryptomator/presentation/CryptomatorApp.kt
- util/src/main/java/org/cryptomator/util/SharedPreferencesHandler.kt
No description provided.