fix: plus button fixes#4195
Merged
Merged
Conversation
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com> # Conflicts: # iOSClient/Files/NCFiles.swift
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the behavior of the floating “+” button by centralizing enable/disable logic (including permissions and E2EE offline constraints) and by preventing touch events from passing through the button when it is disabled.
Changes:
- Centralized “+” button enabled-state computation in
NCContextMenuPlusand reused it fromNCFiles. - Updated “+” button theming callbacks to call the centralized update method instead of directly tinting the button.
- Introduced a
UIButtonsubclass to adjust hit-testing / context-menu behavior when disabled.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| iOSClient/Menu/NCContextMenuPlus.swift | Adds centralized enabled-state calculation and uses it during menu creation. |
| iOSClient/Main/NCMainNavigationController.swift | Replaces the plus button with a subclass to refine hit-testing and context menu behavior. |
| iOSClient/Files/NCFiles.swift | Routes theming/account/permission refreshes through the centralized plus button update method. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mpivchev
marked this pull request as draft
July 20, 2026 10:58
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
iOSClient/Main/NCMainNavigationController.swift:455
- The hit-testing comment doesn’t match the actual behavior: the override only swallows taps when the button is disabled and still visible (not when it’s hidden or below the alpha threshold). This can mislead future changes/debugging; either update the comment or adjust the guard to match the stated intent.
// Keep hit testing so taps don't fall through if the button is disabled, hidden or low alpha.
…utton-fixes # Conflicts: # iOSClient/Files/NCFiles.swift # iOSClient/Main/NCMainNavigationController.swift # iOSClient/Menu/NCContextMenuPlus.swift
Merged
marinofaggiana
approved these changes
Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
isEnabledchecks in one place. Before one would overwrite the other, causing bugs like button being enabled in a non editable folder (Server still has final authority)Tested with