Closed sonusourav closed 4 years ago
It should exit the app to keep the behaviour we have had unless @kelson42 wants to chime in and say it should return to the home screen to select a zim.
What is probably happening is 2 instances of MainActivity are created somehow, this should be easy to detect.
@macgills What is the intended way of navigating back to the zim browser from an opened zim file? The only consistent way I have used is to close all tabs.
Open a new tab from the + in tabswitcher, this presents the list for you to choose a new book or the same book. Choosing a new book will close all the tabs that were open of another book
@macgills Okay! I did not know about the + button, thanks.
@macgills @Frans-Lukas In any case, the behaviour should be consistent. IMO should come back to home screen and then exit if back called an other time.
@kelson42 I agree when comparing with how a browser handles back navigation as well as Googles recommendation:
"Every app you build has a fixed start destination. This is the first screen the user sees when they launch your app from the launcher. ... This is also the last screen they see before exiting the app. [using back navigation]" https://developer.android.com/guide/navigation/navigation-principles
@kelson42 So, should I proceed with bringing the user to home screen instead of directly escaping?
Lets go home screen (aka list of books under the kiwix banner) then, I never really knew why it worked how it did anyway.
Describe the bug
In some Zim files, on pressing back button lands on the home screen while in some others it exits the app. I can't guess the pattern in which case first happens and in which case second happens.
Expected behavior
In all cases, it should be the same. Either the app should exit or home screen should appear.
P.S.: It would be better if home screen appears.
Steps to reproduce the behavior: Case is random so not necessary it would work on following the steps.
Screenshots
Link
Environment