-
Notifications
You must be signed in to change notification settings - Fork 19
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: not switching to proper conversation when navigating from notification [WPB-4294] #2211
Merged
saleniuk
merged 4 commits into
release/candidate
from
fix/conversation_notification_navigation
Sep 13, 2023
Merged
fix: not switching to proper conversation when navigating from notification [WPB-4294] #2211
saleniuk
merged 4 commits into
release/candidate
from
fix/conversation_notification_navigation
Sep 13, 2023
Conversation
This file contains 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
APKs built during tests are available here. Scroll down to Artifacts! |
Build 688 succeeded. The build produced the following APK's: |
saleniuk
requested review from
a team,
yamilmedina,
alexandreferris,
MohamadJaara,
Garzas and
trOnk12
and removed request for
a team and
trOnk12
September 12, 2023 07:49
alexandreferris
approved these changes
Sep 12, 2023
ohassine
approved these changes
Sep 12, 2023
…ersation_notification_navigation
…ersation_notification_navigation
APKs built during tests are available here. Scroll down to Artifacts! |
…ersation_notification_navigation
APKs built during tests are available here. Scroll down to Artifacts! |
Build 733 succeeded. The build produced the following APK's: |
6 tasks
github-actions bot
pushed a commit
that referenced
this pull request
Sep 13, 2023
…cation [WPB-4294] (#2211)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
Tapping on notification does not forward the user to the according conversation when another conversation is open.
Causes (Optional)
Compose destinations library has two interfaces containing
route
parameter that can't be used interchangeably.Route
is used to define destinations and its route is always a template with arguments placeholders, like the native compose navigation uses, for example:conversation_screen/{conversationId}
. As documentation states:Route
instances are not suited to navigate to unless they're alsoDirection
.Direction
also has aroute
parameter, but it's the specific route with filled proper arguments, likeconversation_screen/id123456
as it's used when navigating. So,route
parameters of both types shouldn't be compared.Because it couldn't compare it properly, it couldn't find the destination of the same type in the back stack. Together with
launchSingleTop
set to true, when we have already a destination of typeConverstationScreen
at the top of the back stack, it won't be replaced with a new one, thus when opening anotherConversationScreen
it still keeps the previous one on screen and ignores the new one.Solutions
Instead of comparing full routes, extract the base of each route, which is unique for each destination, and then compare only that part to find the specific destination type in the back stack.
Testing
How to Test
Open conversation A, receive notification for conversation B, click on that notification - the app should open the conversation B screen.
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.