Add option to re-prompt at intervals after user accept/ignore#21
Add option to re-prompt at intervals after user accept/ignore#21sampengilly wants to merge 2 commits intoVorlonsoft:masterfrom sampengilly:reprompt-date
Conversation
| return getAgreeShowDialog() && | ||
| // If Agree show is false (user has ignored/accepted) then return false unless it has | ||
| // been `repromptDate` time since the time when the user accepted/ignored the prompt | ||
| return (getAgreeShowDialog() || isOverLastAgreeShowFalseDate()) && |
There was a problem hiding this comment.
'&&' should be on a new line.
There was a problem hiding this comment.
Matching existing style as much as possible while combining the tightly related ||
|
|
||
| private static final String PREF_KEY_IS_AGREE_SHOW_DIALOG = "androidrate_is_agree_show_dialog"; | ||
|
|
||
| private static final String PREF_KEY_LAST_AGREE_SHOW_FALSE_DATE = "androidrate_last_agree_show_false_date"; |
There was a problem hiding this comment.
Line is longer than 100 characters (found 111).
There was a problem hiding this comment.
Not the only one among these constants
| import static com.vorlonsoft.android.rate.PreferenceHelper.getCustomEventCount; | ||
| import static com.vorlonsoft.android.rate.PreferenceHelper.getInstallDate; | ||
| import static com.vorlonsoft.android.rate.PreferenceHelper.getIsAgreeShowDialog; | ||
| import static com.vorlonsoft.android.rate.PreferenceHelper.getLastAgreeShowFalseDate; |
There was a problem hiding this comment.
Wrong lexicographical order for 'com.vorlonsoft.android.rate.PreferenceHelper.getLastAgreeShowFalseDate' import. Should be before 'java.util.Map'.
There was a problem hiding this comment.
Matching existing imports in alphabetical order
|
Code Climate has analyzed commit 57d7b50 and detected 3 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Allow the prompt to be shown again at intervals after each user action (accept/ignore).
Track the time each time the AgreeShowDialog preference is set to false. When checking if this value is false,
orit with the result ofisOverLastAgreeShowFalseDate()to determine if it has been X time units since AgreeShowDialog was set to false, a result oftruewill continue with the rest of the evaluation.Defaults to off. Setting a time unit will turn the check on. Date of AgreeShowDialog = false is always tracked