tylerbwong / stack

An Android app for browsing Stack Overflow and other Stack Exchange sites.
https://stack.tylerbwong.me
GNU General Public License v3.0
506 stars 34 forks source link

[Feature request] Open homepage using the "back" button on post opened from link #129

Closed KaKi87 closed 1 year ago

KaKi87 commented 1 year ago

Is your feature request related to a problem? Please describe. When opening a post from a link, clicking the in-app "back" button will exit the app.

Describe the solution you'd like Open the homepage instead.

Describe alternatives you've considered None

Additional context None


Thanks

tylerbwong commented 1 year ago

Added as a user setting in f614d11.

KaKi87 commented 1 year ago

Thanks, please notify me once released.

tylerbwong commented 1 year ago

@KaKi87 Could you briefly explain some of the use-cases for wanting to remain in the app if hitting back after clicking a deep link?

The reason for the current functionality is mainly because I use a search engine to find questions, and it makes more sense to return to that search after hitting back from a question. Curious to know why you'd prefer to remain in the app instead.

KaKi87 commented 1 year ago

The reason for the current functionality is mainly because I use a search engine to find questions

Me too. Secondly, when clicking on questions linked from GitHub issues, Discord conversations, etc.

Could you briefly explain some of the use-cases for wanting to remain in the app if hitting back after clicking a deep link?

After reading a question :

it makes more sense to return to that search after hitting back from a question

Yes, but Android's back action will continue to fullfill that need.


Additionally, the same behavior will occur when clicking notifications.

tylerbwong commented 1 year ago

@KaKi87 Thanks for the great feedback! I've made it the permanent default in 2.1.1 (Awaiting approval from Google or non-play version available through the release page now)

KaKi87 commented 1 year ago

Hello there, Looks like I got the update. The back button opens homepage as expected, however, so does Android's back action (e.g. gesture or bottom bar), while it should open the previous app like it used to. Thanks

tylerbwong commented 1 year ago

Hey there! Could you possibly send a video of the behavior? Thanks!

KaKi87 commented 1 year ago

tylerbwong commented 1 year ago

I see, thanks for the video. Unfortunately, I don't think I'll be making any further changes as I've tried to follow the documentation for navigation as closely as possible. See up and back are identical within your app's task. A few other popular apps I use also implement the same behavior.

KaKi87 commented 1 year ago

@maniac103 Your implementation of this feature on OctoDroid works well, how did you do it ?

maniac103 commented 1 year ago

@KaKi87 Implementing it is easy and probably not the problem. The question is what one wants to happen. Judging from the link above Google changed the guidelines at some point: when I did the Octodroid implementation, the guidelines said 'Up does hierarchical navigation, while Back does temporal navigation' [1]... which, compared to 'both buttons do the same thing' makes more sense to me. But one can't really argue against following the current guidelines, I guess 🤷‍♂️ [1] Nowadays I can only find a copy of that page ... here is a copy of a different related page.

tylerbwong commented 1 year ago

Sorry for the very late reply, but circling back to this (turns out I can't read):

When your app is launched using a deep link on another app's task, Up transitions users back to your app’s task and through a simulated back stack and not to the app that triggered the deep link. The Back button, however, does take you back to the other app.

I'll keep this issue open until it's fixed.

tylerbwong commented 1 year ago

Fixed in fd4864b

KaKi87 commented 1 year ago

Please notify me once this is released.

Thanks