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

Hitting back on the DWDS app exits it #3507

Closed
Popolechien opened this issue Oct 20, 2023 · 7 comments · Fixed by #3512
Closed

Hitting back on the DWDS app exits it #3507

Popolechien opened this issue Oct 20, 2023 · 7 comments · Fixed by #3512
Assignees
Milestone

Comments

@Popolechien
Copy link
Member

I'm on a Nothing Phone (1) running Android 13. The usual manner to come back to the previous page is to slide the screen right-to-left. With the current test DWDS (as well as Wikimed; 2023-06 build 6231840) apps, this closes the app and returns the user to the phone's home screen.

I cannot reproduce this bug on the Kiwix app (3.7.1 build 7230701) - going back works fine there.

@kelson42
Copy link
Collaborator

We should move this ticket to kiwix/kiwix-android... and look for duplicates. This topic has already been discussed AFAIK.

@kelson42 kelson42 self-assigned this Oct 20, 2023
@Popolechien Popolechien transferred this issue from kiwix/kiwix-android-custom Oct 20, 2023
@Popolechien
Copy link
Member Author

Looks like this was addressed in #2886 - is this a regression then?

@kelson42 kelson42 added this to the 3.8.0 milestone Oct 20, 2023
@MohitMaliFtechiz
Copy link
Collaborator

MohitMaliFtechiz commented Oct 20, 2023

@kelson42, @Popolechien It not only exits the app when clicking on the back button, but if you read the Zim file and clicked on an article it takes you to the second page then if you click the back button also it exit from the application instead of going to the previous page.

backbuttonissue.mp4

This is because on the CustomReaderFragment when the back-pressed event triggers we are finishing the activity

this was introduced in #2371 I am currently checking why we have finished the activity when back-pressed is triggered and what will happen if we remove this.

@MohitMaliFtechiz
Copy link
Collaborator

@Popolechien, @kelson42 I have placed a fix for it in #3512.

@kelson42
Copy link
Collaborator

@MohitMaliFtechiz Please secure that for the whole class only the strict necessary is reimplemented (I have seen many methods which are reimplemented without reason). If not, then a clear warning (as code comment) inviting to look the the child class version of the method should he put at parent method head.

It does not make sense to me to override a method and just calling "super". Just remove overriding and it should take parent version.

@kelson42
Copy link
Collaborator

@MohitMaliFtechiz You don't have follow my request, please do.

@MohitMaliFtechiz
Copy link
Collaborator

@MohitMaliFtechiz You don't have to follow my request, please do.

@kelson42 I have removed the unnecessary overridden from CustomReaderFragment, Sorry i have not removed it from the full code I was thinking it was not related to this PR. I am removing those unnecessary overridden methods from the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants