Skip to content

Conversation

@cypherop
Copy link
Contributor

Fixes #2044 2.9.0: Unable to exit app after going to notifications activity

What changes did you make and why?
Added finish() inside onBackPressed() method in app/src/main/java/fr/free/nrw/commons/notification/NotificationActivity.java

Tested on Motorola Moto g(5) plus with API level 24

@codecov-io
Copy link

Codecov Report

Merging #2101 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2101      +/-   ##
=========================================
- Coverage    5.61%   5.61%   -0.01%     
=========================================
  Files         225     225              
  Lines       11371   11372       +1     
  Branches     1063    1063              
=========================================
  Hits          638     638              
- Misses      10681   10682       +1     
  Partials       52      52
Impacted Files Coverage Δ
...nrw/commons/notification/NotificationActivity.java 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f3a90c0...6ce0bc5. Read the comment docs.

@domdomegg
Copy link
Member

domdomegg commented Dec 11, 2018

This does fix #2044, but why was the onBackPressed method overridden anyways - @neslihanturan? The back button seems to work fine for me in commit 629bff59 (the one before #1995 was merged).

@cypherop
Copy link
Contributor Author

I tried to remove onBackPressed method. In that case app exits directly from notification activity and does not turns you back to main activity

@domdomegg
Copy link
Member

Doing some testing, if opened via the nav drawer there are no issues. If opened via the menu bar it does seem to get stuck in a stack.

Nav drawer:
navdraw

Menu bar:
menubar

@domdomegg
Copy link
Member

Okay I think I've fixed the root cause in MainActivity.java. Will open a PR in a bit. Apologies for kinda overwriting your work.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants