Skip to content

Comments

showDirectoryWhenDeletionCompleted set to false?#14646

Merged
tobiasKaminsky merged 1 commit intomasterfrom
keepPreviewWhenDeletingFiles
Mar 19, 2025
Merged

showDirectoryWhenDeletionCompleted set to false?#14646
tobiasKaminsky merged 1 commit intomasterfrom
keepPreviewWhenDeletingFiles

Conversation

@tobiasKaminsky
Copy link
Member

@tobiasKaminsky tobiasKaminsky commented Mar 7, 2025

  • Tests written, or not not needed

@tobiasKaminsky
Copy link
Member Author

@alperozturk96 I am not sure why this boolean is needed at all?

old behaviour

  • have multible images in a folder
  • click on one, to open slide show
  • delete one
    --> folder listing is shown

now:

  • have multible images in a folder
  • click on one, to open slide show
  • delete one
    --> another image is shown

I also tested if last image is deleted, then the empty directory is shown

@alperozturk96
Copy link
Collaborator

@alperozturk96 I am not sure why this boolean is needed at all?

old behaviour

  • have multible images in a folder
  • click on one, to open slide show
  • delete one
    --> folder listing is shown

now:

  • have multible images in a folder
  • click on one, to open slide show
  • delete one
    --> another image is shown

I also tested if last image is deleted, then the empty directory is shown

PreviewImageActivity extends from FileActivity, so the delete logic in RemoveFilesDialogFragment was not applied when deleting an image from the preview. I have addressed in this PR (#14498).

I thought this was not the expected behavior. Since the user is in a folder rather than a gallery, I would expect the flow to return directly to the file list after deleting an image, rather than continuing to view other images in the folder.

If the expected behavior is to continue viewing other images, you can remove the showDirectoryWhenDeletionCompleted() function and the showDirectoryWhenDeletionCompleted boolean variable.

@tobiasKaminsky
Copy link
Member Author

It is the expected (and previous behaviour), thus I will remove it.
Thanks for the confirmation 👍

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
@github-actions
Copy link

github-actions bot commented Mar 7, 2025

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/14646.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@github-actions
Copy link

github-actions bot commented Mar 7, 2025

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

@alperozturk96 alperozturk96 added this to the Nextcloud App 3.31.1 milestone Mar 7, 2025
@alperozturk96
Copy link
Collaborator

/backport to stable-3.31

@tobiasKaminsky tobiasKaminsky merged commit 8ebd8e1 into master Mar 19, 2025
16 of 21 checks passed
@tobiasKaminsky tobiasKaminsky deleted the keepPreviewWhenDeletingFiles branch March 19, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants