feat: Do not display the review pop-up again if the user clicks no - #752
feat: Do not display the review pop-up again if the user clicks no#752Elouan1411 wants to merge 4 commits into
Conversation
e6a47f9 to
acf6c03
Compare
There was a problem hiding this comment.
Pull request overview
Adds a persistent “do not show again” flag to the in-app review gating logic so that once a user declines (via the negative/feedback path), the review prompt won’t be shown in future sessions.
Changes:
- Introduce a new DataStore preference key (
DO_NOT_SHOW_AGAIN_KEY) with a default value. - Update
shouldDisplayReviewDialogto also depend on the new “do not show again” flag. - Persist the “do not show again” flag when the user chooses the feedback/negative action.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
InAppReview/src/standard/kotlin/com/infomaniak/core/inappreview/reviewmanagers/InAppReviewManager.kt |
Includes the new flag in the dialog display conditions and writes the flag when the user selects the negative/feedback path. |
InAppReview/src/main/kotlin/com/infomaniak/core/inappreview/AppReviewSettingsRepository.kt |
Adds the new DataStore key and default initial value wiring. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
PR Reviewer Guide 🔍(Review updated until commit 8ec8440)Here are some key observations to aid the review process:
|
|
Persistent review updated to latest commit 5225da1 |
5225da1 to
acf6c03
Compare
|
Failed to generate code suggestions for PR |
acf6c03 to
e3c8fbb
Compare
e658c64 to
8ec8440
Compare
|
Persistent review updated to latest commit 8ec8440 |
8ec8440 to
2ca15f9
Compare
|
Failed to generate code suggestions for PR |
2ca15f9 to
9acb957
Compare
|
Failed to generate code suggestions for PR |
9acb957 to
b24e902
Compare
FabianDevel
left a comment
There was a problem hiding this comment.
You shouldn't add a new preference.
The logic now is that either way if you click on one or the other button, the popup should not come back.
So you can use a single preference for both
The best should be that you don't do anything by default, and just move the logic of the threshold on the onDismiss action
b24e902 to
c8199eb
Compare
|
3c5aace to
5943ce0
Compare
5943ce0 to
11abef0
Compare
cff4c1a to
dd10b16
Compare
|
dd10b16 to
23eb461
Compare
30123d1 to
2d6bc34
Compare
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (4)
InAppReview/src/main/kotlin/com/infomaniak/core/inappreview/BaseInAppReviewManager.kt:31
- Removing this parameter changes the public
initmethod descriptor, so existing consumers can fail to compile (named argument) or at runtime (NoSuchMethodError) even when they did not explicitly set it. Preserve a deprecated compatibility overload/parameter while transitioning consumers; the implementation may ignore it under the new one-shot behavior.
open fun init(
countdownBehavior: Behavior = Behavior.LifecycleBased,
appReviewThreshold: Int? = null,
onUserWantToReview: (() -> Unit)? = null,
onUserWantToGiveFeedback: (() -> Unit)? = null
InAppReview/src/standard/kotlin/com/infomaniak/core/inappreview/reviewmanagers/InAppReviewManager.kt:89
setAppReviewedStatusnow records that the dialog was shown, not that the app was reviewed. Rename it to match the persisted state and avoid callers treating this as proof that a review occurred.
override fun onReviewDialogShown() {
setAppReviewedStatus()
InAppReview/README.md:79
- This example marks the prompt as asked while rendering under
if (shouldDisplay). The DataStore update then makes the flow emitfalse, recomposes this branch away, and dismisses the dialog before the user can choose an action. Keep dialog visibility in separate remembered state and perform the persistence call as a side effect.
if (shouldDisplay) {
reviewManager.onReviewDialogShown()
ReviewDialog(
InAppReview/src/standard/kotlin/com/infomaniak/core/inappreview/reviewmanagers/InAppReviewManager.kt:47
- These names still mix the old “gave review” meaning with the new “was asked” state, and
alreadyAskReviewis not a clear boolean name. Rename the flow and lambda parameter consistently so future changes do not mistake displaying the prompt for submitting a review.
This issue also appears on line 88 of the same file.
override val shouldDisplayReviewDialog =
combine(alreadyAskReview, appReviewCountdown) { alreadyGaveReview, countdown ->
!alreadyGaveReview && countdown <= 0



No description provided.