-
Notifications
You must be signed in to change notification settings - Fork 555
fix: App exit on back pressed #629
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
Conversation
|
@nikit19 pls review |
nikit19
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the correct solution.
If the user is on the events fragment and he presses the back button, the app should close.
If he has opened search fragment he should return to the events fragment on backpress. (current behaviour)
|
@nikit19 Updated and Added GIF for the changes. pls review |
|
This is a workaround, find why |
|
@iamareebjamal |
|
Fragments don't have onBackPressed, their container activity does. Find why it is not working |
|
@iamareebjamal @nikit19 pls review |
|
@iamareebjamal The problem is with the stack generated. Currently the onBackPressed method is loading the event fragment two times one with loadfragment and then with checkandLoad method. So I had cleared the stack generated everytime the user press the back button and located the user to Event Fragment which is required . Now the user can easily exit the app as there is only 1 fragment in the stack. |
|
@iamareebjamal I think the issue is solved pls review |
|
This is still a workaround. I will see what can be done |
|
Old and conflicting with the current logic |
fixes #626
GIF for the change