Skip to content

fix: plus button fixes#4195

Merged
marinofaggiana merged 9 commits into
masterfrom
plus-button-fixes
Jul 21, 2026
Merged

fix: plus button fixes#4195
marinofaggiana merged 9 commits into
masterfrom
plus-button-fixes

Conversation

@mpivchev

@mpivchev mpivchev commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator
  • Consolidate isEnabled checks 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)
  • Fix button being pressed through even if disabled (capture hit testing)
  • Do not wait on collection reload dependent e2ee flag but instead use the metadata check. The old check caused delays in disabling the button.

Tested with

  • < ios 26 and >= ios 26
  • PR vs master
  • e2ee directories + no internet.

mpivchev and others added 6 commits July 17, 2026 13:55
Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>

# Conflicts:
#	iOSClient/Files/NCFiles.swift
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>
Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>
Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>
Copilot AI review requested due to automatic review settings July 20, 2026 10:35
@mpivchev
mpivchev changed the base branch from master to liquig-glass-btn July 20, 2026 10:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 NCContextMenuPlus and reused it from NCFiles.
  • Updated “+” button theming callbacks to call the centralized update method instead of directly tinting the button.
  • Introduced a UIButton subclass 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.

Comment thread iOSClient/Main/NCMainNavigationController.swift Outdated
Comment thread iOSClient/Main/NCMainNavigationController.swift
Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>
@mpivchev
mpivchev requested a review from marinofaggiana July 20, 2026 10:47
@mpivchev
mpivchev marked this pull request as draft July 20, 2026 10:58
Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>
@mpivchev
mpivchev marked this pull request as ready for review July 20, 2026 13:49
@mpivchev mpivchev added the bug label Jul 20, 2026
@mpivchev
mpivchev requested a review from Copilot July 20, 2026 13:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Base automatically changed from liquig-glass-btn to master July 21, 2026 05:51
…utton-fixes

# Conflicts:
#	iOSClient/Files/NCFiles.swift
#	iOSClient/Main/NCMainNavigationController.swift
#	iOSClient/Menu/NCContextMenuPlus.swift
@mpivchev mpivchev mentioned this pull request Jul 21, 2026
@mpivchev mpivchev changed the title Plus button fixes fix: plus button fixes Jul 21, 2026
@marinofaggiana
marinofaggiana merged commit 8c665a4 into master Jul 21, 2026
5 checks passed
@marinofaggiana
marinofaggiana deleted the plus-button-fixes branch July 21, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants