deckerst / aves

Aves is a gallery and metadata explorer app, built for Android with Flutter.
BSD 3-Clause "New" or "Revised" License
2.73k stars 103 forks source link

Unable to swipe to next image, depending on directory #1207

Closed fbauer-kunbus closed 1 month ago

fbauer-kunbus commented 1 month ago

Describe the bug When I use Aves as image viewer by calling it with 'open with' from an app like Total Commander or X-plore in SOME directories it happens, that thought the image is shown in the Aves viewer, I then cannot swipe to the next or previous image in same directory. BUT in other directories with images, this works without a problem. I could not find any rule for this yet.

To Reproduce Steps to reproduce the behavior:

  1. Open any Explorer app on Android like x-plore
  2. Navigate into a directory with images
  3. Call 'open with'... AVES for any image
  4. Image is shown in Aves, try to swipe left or right to next image.
  5. If 4. worked, try it with a couple of different directories. Not all should work!

Expected behavior All directories with images should be swipeable

deckerst commented 1 month ago

I think I know why, but I'll need you to confirm.

When you share a media file with Aves, you can go to its Info page (swipe up) and see its URI. If it's something like content://media/external/images/media/{some number}, it's public media. Otherwise it's not.

fbauer-kunbus commented 1 month ago

You pointed into the right direction - but unfortunately it is not that easy, since I now found out that Aves can behave differently on ONE AND THE SAME DIRECTORY - depending what actions have been performed before. Sometimes I go into a directory in my 'Total Commander' explorer, tap on an image, and it immediately opens Aves and I can swipe to the next image. Sometimes this does not work, or only if I first explicitly use the 'open with' to point to Aves (even if I already did this before).

Sorry to say, but the behaviour of Aves still looks somewhat arbitrary to me.

You are right that the problem with not being able to swipe to the next image only occurs when the images URL is NOT content://media/external/images/media. BUT when and why this happens, that it identifies the path otherwise (as not being public, as you call ist), I still can not detect. The directories I use to my eye all look the same and have not been deliberately made 'public' or not. In fact all directories I use are sub-directories on the same level that have been created the same way. So where is the difference?

deckerst commented 1 month ago

It's only a bug in Aves if Aves receives a content://media URI and it cannot find the other pictures in the same folder. Please show a screen recording of that, and I'll see what I can do.

Otherwise, it could be an issue with the explorer app, that shares an image with its custom content provider instead of using the public one. Using the public media content provider is not mandatory, but well behaved explorer apps will try their best to do so.