diff --git a/mastodon/.gitignore b/mastodon/.gitignore index 327034ee..819f7181 100644 --- a/mastodon/.gitignore +++ b/mastodon/.gitignore @@ -1,3 +1,5 @@ /build /release /debug +*.apk +output-metadata.json diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/photoviewer/PhotoViewer.java b/mastodon/src/main/java/org/joinmastodon/android/ui/photoviewer/PhotoViewer.java index 41a3b507..e5a3cb00 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/photoviewer/PhotoViewer.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/photoviewer/PhotoViewer.java @@ -62,10 +62,13 @@ public class PhotoViewer implements ZoomPanView.Listener{ windowView=new FrameLayout(activity){ @Override public boolean dispatchKeyEvent(KeyEvent event){ - if(event.getAction()==KeyEvent.ACTION_DOWN && event.getKeyCode()==KeyEvent.KEYCODE_BACK){ - onStartSwipeToDismissTransition(0f); + if(event.getKeyCode()==KeyEvent.KEYCODE_BACK){ + if(event.getAction()==KeyEvent.ACTION_DOWN){ + onStartSwipeToDismissTransition(0f); + } + return true; } - return true; + return false; } @Override