Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix IAMs showing erroneously on every cold start #1863

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

nan-li
Copy link
Contributor

@nan-li nan-li commented Oct 6, 2023

Description

One Line Summary

Fix IAMs displaying on every cold start when they shouldn't be (such as they should only display once or not meeting the time between redisplays).

Details

Motivation

Fix reports of this issue above.

Scope

The fix is to read in dismissed IAMs on IAM Manager start

  • The IAM Manager holds a list of IAMs that have been seen and dismissed by the user called _dismissedMessages.
  • We were not setting this list up when the IAM Manager starts, which led to this issue. Now we read it in on start()
  • Because the _dismissedMessages list was always empty, redisplay data was not passed on to the fetched IAMs, so these IAMs believed they had never been displayed.
  • See equivalent code on player model.

Testing

Unit testing

None

Manual testing

Android emulator API 33
Tested cold starts and backgrounding with these type of IAMs

  • IAMs that are set to display only once
  • IAMs with time gap between redisplays
  • IAMs set to display on every app open

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item

This change is Reviewable

* The IAM Manager holds a list of IAMs that have been seen and dismissed by the user called `_dismissedMessages`.
* We were not setting this list up, and this leads to bugs like displaying IAMs on app start that should not be displayed.
@nan-li nan-li changed the title Fix IAMs showing inappropriately on every cold start Fix IAMs showing when they shouldn't on every cold start Oct 6, 2023
@nan-li nan-li changed the title Fix IAMs showing when they shouldn't on every cold start Fix IAMs showing erroneously on every cold start Oct 6, 2023
@nan-li nan-li merged commit 52e27ea into user-model/main Oct 6, 2023
1 of 2 checks passed
@nan-li nan-li deleted the fix/iam_showing_on_app_launch branch October 6, 2023 19:28
@nan-li nan-li mentioned this pull request Oct 6, 2023
jinliu9508 pushed a commit that referenced this pull request Jan 31, 2024
Fix IAMs showing inappropriately on every cold start
jinliu9508 pushed a commit that referenced this pull request Jan 31, 2024
Fix IAMs showing inappropriately on every cold start
jinliu9508 pushed a commit that referenced this pull request Feb 6, 2024
Fix IAMs showing inappropriately on every cold start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants