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

When the app is opened by link, sometimes the last-viewed page is restored instead #1145

Closed
smichel17 opened this issue Nov 12, 2021 · 3 comments

Comments

@smichel17
Copy link
Contributor

Steps to reproduce:

  1. Open a link to a GitHub issue (let's call it #1)
    • Does not matter if the app is previously open, but it must be opened by link (to issue?).
  2. Put Octodroid into the background (e.g. go home or switch apps)
    • App must remain running in the background (do not dismiss it from recent apps or close it using the back button)
  3. Open a link to a different GitHub issue (#2)

Expected: App opens to issue #2
Actual: App just switches back to the previous view of issue #1

Easiest to reproduce accidentally if you have email notifications enabled.

I suspect the root cause is some Activity not handling the intent the same in its onCreate and onNewIntent callbacks.

@maniac103
Copy link
Collaborator

I suspect the root cause is some Activity not handling the intent the same in its onCreate and onNewIntent callbacks.

The only activity with non-default launch mode is the launcher activity, and with default launch mode one doesn't get onNewIntent.
The BrowseFilter activity, which does the link handling, just is a proxy, that is, keeps the intent flags it's launched with in the intent it then launches after resolving. That means task behavior depends on the launching app ... which is? ;-)

@maniac103
Copy link
Collaborator

Nvm, I can reproduce with the AOSP email app, Google Keep doesn't reproduce because it doesn't set FLAG_ACTIVITY_NEW_TASK.

@smichel17
Copy link
Contributor Author

smichel17 commented Nov 26, 2021

Thanks for the fix :) (and, my app was K-9 mail)

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

No branches or pull requests

2 participants