Camera icon indicating copy to clipboard operation
Camera copied to clipboard

Changing screen orientation in gallery resets current image to first one

Open mb720 opened this issue 2 years ago • 4 comments

Hi and thanks a lot for GrapheneOS!

When I'm in the image gallery and rotate the screen, e.g. from portrait to landscape, the gallery resets to show the first image in the gallery.

Then I have to swipe left to get back to the image I wanted to see.

I'm using a Pixel 6 Pro.

The camera app is:

version 63 app.grapheneos.camera versionCode 63 targetSdk 33 minSdk 29

I tried working around this by changing the gallery app to some different app, but according to the discussion in this feature request, that's not possible.

mb720 avatar Jul 15 '23 21:07 mb720

When I'm in the image gallery and rotate the screen, e.g. from portrait to landscape, the gallery resets to show the first image in the gallery.

Unable to reproduce this. Is this about built-in gallery app in GrapheneOs?

empratyush avatar Sep 29 '23 07:09 empratyush

The bug still happens on my device.

Is this about built-in gallery app in GrapheneOs?

Yes, the one that opens when you click here inside the camera app:

Camera app screenshot

The camera app is:

version 63
app.grapheneos.camera
versionCode 63
targetSdk 33
minSdk 29

mb720 avatar Sep 29 '23 20:09 mb720

Can confirm that this happens when swiping between full screen images in both grid and filmstrip views, except with grid view it's not the first image in the gallery, but rather the one you last opened. To reproduce: open any image from the grid view, swipe to another one without exiting full screen view and then rotate the screen.

tsxv478 avatar Mar 07 '24 21:03 tsxv478

I'm not sure if this was fixed in version 66, which I'm using now, but the issue doesn't occur at the moment. Thanks for fixing this!

Edit: I just tried again rotating the screen and the camera app's gallery showed the first image again. I have no idea what happened in between those tries that made the bug reappear. I have attached logcat.gz that contains the output of adb logcat while I:

  1. opened the camera
  2. started the gallery via the round button on the right side (see previous screenshot with red arrow)
  3. swiped to another image
  4. rotated the phone
  5. got moved back to the first image

@tsxv478: Note that the issue I referred to happened in the camera app's gallery, not the app named "Gallery" that supports filmstrip view and grid view.

mb720 avatar Mar 13 '24 21:03 mb720

The issue has been fixed in the PR mentioned above #440

MHShetty avatar Sep 06 '24 17:09 MHShetty

I'm using the camera app version 74 and this seems to be fixed. Thanks a lot 👍

mb720 avatar Sep 06 '24 20:09 mb720