mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Open external links in same activity (#3395)
It's common for users to expect that re-opening the app would allow them to "continue where they left off". This also applies for the case where they leave the app after opening an external link. It's natural for them to expect that they would see the webpage they left open when they re-open the app. This doesn't happen for our app as we open custom tabs in a separate activity. As a consequence, this makes the experience un-intuitive. Fix this by opening custom tabs in the same activity. Fixes: #2944 Co-authored-by: Adam Jones <jones_adam@rocketmail.com>
This commit is contained in:
parent
e68751f0b9
commit
48b6745349
1 changed files with 1 additions and 1 deletions
|
|
@ -145,7 +145,7 @@ public class Utils {
|
|||
builder.setExitAnimations(context, android.R.anim.slide_in_left, android.R.anim.slide_out_right);
|
||||
CustomTabsIntent customTabsIntent = builder.build();
|
||||
// Clear previous browser tasks, so that back/exit buttons work as intended.
|
||||
customTabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
customTabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
customTabsIntent.launchUrl(context, url);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue