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

feat: persistant in-app messages #269

Merged
merged 8 commits into from
Oct 25, 2023
Merged

feat: persistant in-app messages #269

merged 8 commits into from
Oct 25, 2023

Conversation

Shahroz16
Copy link
Contributor

@Shahroz16 Shahroz16 commented Oct 13, 2023

Gist returns 304 when there is no change in queue status, in Android/OKhttp until we have etag in headers Retrofit doesn't cache and returns the same response. So this adds a workaround where if the response hasn't changed then return the old response for that URL which was returned.

This PR has already passed QA testing.

@github-actions
Copy link

github-actions bot commented Oct 13, 2023

Sample app builds 📱

Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.


  • java_layout: shahroz/in-app-persistant (1698232761)
  • kotlin_compose: shahroz/in-app-persistant (1698232766)

@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

Merging #269 (37ff6fc) into main (c494bb0) will increase coverage by 0.67%.
Report is 18 commits behind head on main.
The diff coverage is 44.11%.

@@             Coverage Diff              @@
##               main     #269      +/-   ##
============================================
+ Coverage     49.76%   50.44%   +0.67%     
- Complexity      237      249      +12     
============================================
  Files           108      108              
  Lines          2781     2809      +28     
  Branches        364      363       -1     
============================================
+ Hits           1384     1417      +33     
+ Misses         1282     1275       -7     
- Partials        115      117       +2     
Files Coverage Δ
...customer/messaginginapp/gist/data/model/Message.kt 54.00% <0.00%> (+1.05%) ⬆️
...main/java/io/customer/sdk/queue/QueueRunRequest.kt 98.00% <97.56%> (+7.61%) ⬆️
...stomer/messaginginapp/gist/presentation/GistSdk.kt 13.17% <33.33%> (+13.17%) ⬆️
...ssaginginapp/gist/presentation/GistModalManager.kt 14.70% <0.00%> (+14.70%) ⬆️
...stomer/messaginginapp/gist/data/listeners/Queue.kt 10.57% <30.76%> (+10.57%) ⬆️
...saginginapp/gist/presentation/GistModalActivity.kt 0.00% <0.00%> (ø)
...inginapp/gist/presentation/engine/EngineWebView.kt 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

@github-actions
Copy link

Build available to test
Version: shahroz-in-app-persistant-SNAPSHOT
Repository: https://s01.oss.sonatype.org/content/repositories/snapshots/

@Shahroz16 Shahroz16 marked this pull request as ready for review October 25, 2023 09:36
@Shahroz16 Shahroz16 requested a review from a team October 25, 2023 10:58
GistSdk.getUserToken()?.let { userToken ->
addHeader(
NetworkUtilities.USER_TOKEN_HEADER,
Base64.encodeToString(userToken.toByteArray(), Base64.NO_WRAP)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep the comment on it for future reference?

@@ -61,6 +62,12 @@ class GistModalActivity : AppCompatActivity(), GistListener, GistViewListener {
} ?: run {
finish()
}

// Disable back button for persistent messages
Copy link
Contributor

@mrehan27 mrehan27 Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need more clarification here, something like this?

Suggested change
// Disable back button for persistent messages
// Add back button to handle in-app message behavior, enabled false with disable back press for persistent messages

@Shahroz16 Shahroz16 merged commit 4fcb781 into main Oct 25, 2023
30 checks passed
@Shahroz16 Shahroz16 deleted the shahroz/in-app-persistant branch October 25, 2023 12:49
github-actions bot pushed a commit that referenced this pull request Oct 25, 2023
## [3.7.0](3.6.7...3.7.0) (2023-10-25)

### Features

* persistant in-app messages ([#269](#269)) ([4fcb781](4fcb781))
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