Skip to content

Fix share button disappearing in favorites - #17978

Merged
alperozturk96 merged 3 commits into
masterfrom
fix/internal-109064-share-button-disappearing-in-favorites
Nov 11, 2026
Merged

alperozturk96 merged 3 commits into
masterfrom
fix/internal-109064-share-button-disappearing-in-favorites

Conversation

@daniele-verducci

@daniele-verducci daniele-verducci commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Repro:

  • Share some files with other users/groups/public links
  • Add these files to favorites, along with unshared files
  • Open Favorites tab
  • The share button (person icon with +) disappears for the unshared files
  • Pull to refresh
  • Go back to All files
  • The share button do not reappear

The real fix is in the first commit (the search type wasn't reset when swapping directrory), but I noticed we actually have the sharee data in the Favorites list, so not sure why the icon was hidden. I decided to just show it (second commit).

🖼️ Screenshots

🏚️ Before 🏡 After
image image

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

@daniele-verducci

Copy link
Copy Markdown
Contributor Author

@tobiasKaminsky @alperozturk96 what do you think? I can revert the last commit, if that's the case!

@daniele-verducci daniele-verducci added this to the Nextcloud App 35.2.0 milestone Nov 5, 2026
@daniele-verducci daniele-verducci changed the title Fix/internal 109064 share button disappearing in favorites Fix share button disappearing in favorites Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

📱 QA build

Download app-qa-debug.apk
QR code Open the QR code for this download
Commit dfd0dc4
Version 17978
Available until 7 days after this build

The QA build installs alongside a released Nextcloud app, so you can keep
using your existing install while testing.

Downloading the file requires a GitHub account, so open this link on the
device you want to test on, or transfer the APK to it.

onSwapped: () -> Unit
) {
this.onlyOnDevice = onlyOnDevice
searchType = null

@alperozturk96 alperozturk96 Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

swapDirectory can be called also when user in the favorites or shared thus setting null should not be the right way?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done this because the searchType setting persisted when going back to All files after having visited Favorites. From my tests it seems to work, but I may have failed to test all the edge cases! What's the right way of doing this? Should I reset it only if navigating to All files?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when i delete this line still working can u check?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's expected due to the following commit: there I enable the sharing icon also for the Favorites list and thus the button is always shown. I don't know if that's ok, as I see it was deliberately disabled, so it was by design. But it seems to work perfectly, ad if it's ok to keep it (the share button in favorites list), I could just delete this line and merge.
What do you think?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tobiasKaminsky share button should be enabled in favorite tab as well all the time right? I mean why I cannot share favorite file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this: d8b2a21823
I think that limitation is just obsolete

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted the first commit so that, in case we decide to keep the share in favorites, this can be merged as is.

…k to normal files list

Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
@alperozturk96
alperozturk96 force-pushed the fix/internal-109064-share-button-disappearing-in-favorites branch from 259073c to 5d79a3d Compare November 6, 2026 08:23
…oing back to normal files list"

This reverts commit 31cb0f3.

Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

SpotBugs

CategoryBaseNew
Bad practice2424
Correctness4848
Dodgy code128128
Experimental11
Malicious code vulnerability11
Multithreaded correctness1313
Performance2626
Security1515
Total256256

@codecov

codecov Bot commented Nov 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@alperozturk96

Copy link
Copy Markdown
Collaborator

/backport to stable-35.1.x

@alperozturk96

Copy link
Copy Markdown
Collaborator

Things to test...

  1. Have nested folder structure that favorites and shared
  2. Have a clean DB on client side
  3. Open app directly (very fast, better test on slow instance or connection) go to favorites. (If directory tree is more than two okay to just open favorites)
  4. Tap share button
  5. User must see the latest share info

@daniele-verducci

Copy link
Copy Markdown
Contributor Author

User must see the latest share info

Done this test with a 4th-level depth folder created from web:
image

Result seems ok:
image

@alperozturk96
alperozturk96 merged commit 487eaec into master Nov 11, 2026
25 of 26 checks passed
@alperozturk96
alperozturk96 deleted the fix/internal-109064-share-button-disappearing-in-favorites branch November 11, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants