Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix - Edit, Delete Behaviors on PreviewImageActivity #13340

Merged

Conversation

alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Jul 30, 2024

  • Tests written, or not not needed

Problems?

  1. The first time an image is selected for editing, the app flickers for a brief moment and the user have to press the same button again.
  2. Does not focus on the next image after deleting from the image detail page.
  3. If last image deleted from image detail page, previous screen is not updated, still last image is visible after deletion.

Steps to Reproduce 1

  1. Open the application
  2. Go to Media view
  3. Select an image that has never been edited
  4. Tap on the three dot menu and tap the edit button

Steps to Reproduce 2

  1. Open the application
  2. Go to Media view
  3. Have multiple images
  4. Select an image that and delete

Steps to Reproduce 3

  1. Open the application
  2. Go to Media view
  3. Have one image in media screen
  4. Select the last image and delete

Fixes

  1. When the user presses the edit button, if the image is not yet downloaded, show a loading dialog. Wait for the download to complete, then start the edit image activity.
  2. After deletion update view pager
  3. After last image deletion send refresh search event broadcast

Demo

fix.mp4

Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
@alperozturk96 alperozturk96 changed the title Bugfix Start Edit Image Activity When Image Is Not Downloaded Fix Flickering and Repeated Button Press Issue When Editing New Images Jul 30, 2024
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
@alperozturk96 alperozturk96 changed the title Fix Flickering and Repeated Button Press Issue When Editing New Images Fix Flickering and Repeated Button Press Issue When Editing New Images and Delete Behavior on PreviewImageActivity Jul 30, 2024
@alperozturk96 alperozturk96 changed the title Fix Flickering and Repeated Button Press Issue When Editing New Images and Delete Behavior on PreviewImageActivity Fix Edit, Delete Behavior on PreviewImageActivity Jul 30, 2024
@alperozturk96 alperozturk96 changed the title Fix Edit, Delete Behavior on PreviewImageActivity Fix Edit, Delete Behaviors on PreviewImageActivity Jul 30, 2024
@alperozturk96 alperozturk96 changed the title Fix Edit, Delete Behaviors on PreviewImageActivity Fix - Edit, Delete Behaviors on PreviewImageActivity Jul 30, 2024
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Copy link

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/13340.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.

Copy link

Codacy

Lint

TypemasterPR
Warnings6262
Errors33

SpotBugs

CategoryBaseNew
Bad practice6363
Correctness6363
Dodgy code306306
Experimental11
Internationalization77
Multithreaded correctness66
Performance5252
Security1818
Total516516

@alperozturk96 alperozturk96 merged commit 7f0d82f into master Jul 30, 2024
22 checks passed
@AndyScherzinger AndyScherzinger deleted the bugfix/start-edit-image-activity-when-image-is-not-down branch July 30, 2024 20:59
@alperozturk96
Copy link
Collaborator Author

/backport to stable-3.29

Copy link

backportbot bot commented Aug 8, 2024

The backport to stable-3.29 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable-3.29
git pull origin stable-3.29

# Create the new backport branch
git checkout -b backport/13340/stable-3.29

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 7eac3e66 7dfc56c7 60571635 f5011c31 8a42462c ed7d0aaa

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/13340/stable-3.29

Error: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

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.

3 participants