-
Notifications
You must be signed in to change notification settings - Fork 29
[MOB-9340] Fix for removing recalled campaigns from device memory #893
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
Open
sumeruchat
wants to merge
11
commits into
master
Choose a base branch
from
feature/MOB-9340-fix-recalled-campaigns-ios
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
59bf825
[MOB-9340] fix: mark recalled in-app messages as consumed before remo…
sumeruchat 52f775e
[MOB-9340] Remove redundant in-app message consumption call before de…
sumeruchat 4fda5df
[MOB-9340] Enhance In-App Message Handling- Add `syncInApp()` call af…
sumeruchat 1bb9810
[MOB-9340] Update Gradle build scripts: migrate from jcenter to maven…
sumeruchat 3d7a03a
[MOB-9340] Set Kotlin JVM target to 17 in build.gradle
sumeruchat adfd8e6
[MOB-9340] Set Kotlin JVM target to 17 in build.gradle
sumeruchat d55ce26
[MOB-9340] Refactor IterableInAppManagerSyncTest: Use Arrays.asList f…
sumeruchat 9615c83
[MOB-9340] fix: consume in-app message via API before removalEnsure i…
sumeruchat 5eb2cb1
[MOB-9340] Make classes and functions public for broader accessibility
sumeruchat ecaba46
[MOB-9340] Remove unused testNamespace from build.gradle
sumeruchat 51a21cb
Cosmetic corrections suggested by checkstyle
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -321,6 +321,8 @@ public void handleInAppClick(@NonNull IterableInAppMessage message, @Nullable Ur | |
synchronized void removeMessage(String messageId) { | ||
IterableInAppMessage message = storage.getMessage(messageId); | ||
if (message != null) { | ||
// Mark message as consumed before removing it to prevent it from being displayed | ||
message.setConsumed(true); | ||
storage.removeMessage(message); | ||
} | ||
notifyOnChange(); | ||
|
@@ -365,7 +367,10 @@ private void syncWithRemoteQueue(List<IterableInAppMessage> remoteQueue) { | |
|
||
for (IterableInAppMessage localMessage : storage.getMessages()) { | ||
if (!remoteQueueMap.containsKey(localMessage.getMessageId())) { | ||
// Mark message as consumed before removing it to prevent it from being displayed | ||
localMessage.setConsumed(true); | ||
storage.removeMessage(localMessage); | ||
api.inAppConsume(localMessage, null, null, null, null); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lets get a confirmation from product to see if recalled message should be consumed. As it could affect the analytics. |
||
|
||
changed = true; | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets remove all the build and embedded related changes from this PR