Gallery icon indicating copy to clipboard operation
Gallery copied to clipboard

images are overwritten without confirmation after rotation and back button

Open ngrcld opened this issue 1 year ago • 1 comments

Checklist

  • [X] I can reproduce the bug with the latest version given here.
  • [X] I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • [X] I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • [X] I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • [X] I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • [X] This issue contains only one bug.
  • [X] I have read and understood the contribution guidelines.

Affected app version

1.1.3

Affected Android/Custom ROM version

Android 13

Affected device model

Motorola Edge 30

How did you install the app?

GitHub releases

Steps to reproduce the bug

  1. open an image
  2. click on image rotation icon
  3. make a rotation
  4. press back arrow (or Android back button)

Expected behavior

nothing should happen to the image, because the confirmation button wasn't pressed

Actual behavior

the image is re-saved rotated, overwriting the original image, without prompt

Screenshots/Screen recordings

The thumbnail is not updated, but the actual image is now rotated. Don't check the image with Google Photos because it caches images... use another viewer or check the image checksum before and after the rotation

Additional information

No response

ngrcld avatar Jun 20 '24 19:06 ngrcld

Still affects 1.2.0 release, on LineageOS 21 on Pixel 3

Violet-RM avatar Sep 23 '24 00:09 Violet-RM

The relevant code is in app/src/main/kotlin/org/fossify/gallery/fragments/PhotoFragment.kt at the end of PhotoFragment::onDestroyView method.

This comes from SimpleGallery times. Original creator was very insistent on implicit rotation save being the correct behavior. I really hope this will change under new management and I won't have to patch every single release for myself.

rkolbaskin avatar Oct 28 '24 13:10 rkolbaskin

@rkolbaskin You can create a PR with this change. This bug doesn't have needs triage label, so if the fix is valid, we will accept it.

Aga-C avatar Oct 28 '24 13:10 Aga-C

@Aga-C My whole experience with kotlin (or java for that matter) is removing those 6 lines of code. I don't even remember how I managed to find out what part of the code to edit and I am not sure what side effects it might have. I don't think I am qualified to make such pull requests.

rkolbaskin avatar Oct 28 '24 14:10 rkolbaskin

Actually no. I do remember. I found implicit save added in commit 18277c13e22a565915dac22d6a36ffc368fde313 commented with "save rotated images automatically".

rkolbaskin avatar Oct 28 '24 14:10 rkolbaskin

We're not Simple Mobile Tools - if needed, we can change something done by the original maintainer, even if it was done purposefully. It makes more sense to accept changes with the tick button.

Aga-C avatar Oct 28 '24 15:10 Aga-C