Conversation
… button Leaving a Markdown file with the back button popped NCViewerDirectEditing without running Text's close(), so the editing session was never closed and the file stayed "Locked by Text" on the server. Text's own close button saves, closes the session (releasing the lock) and then posts "close". For the Text editor, route the back button through that close button and let the existing "close" message pop the view, with a 5 s fallback so navigation can never get stuck. Fixes nextcloud/text#8858 Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Steven Spungin <steven@spungin.tv>
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.
Opening a Markdown file in the app and leaving it with the back button leaves the file permanently "Locked by Text" on the server. Leaving with Text's own close (✕) button does not.
The close button runs Text's
close(): it saves, closes the editing session (which releases thefiles_locklock), then postsclosetoDirectEditingMobileInterface. The back button popsNCViewerDirectEditingwithout any of that.viewWillDisappearalready callsonClose()for Collabora, but there was no equivalent for Text.For the Text editor, this PR replaces the back button with one that presses Text's close button and lets the existing
closemessage pop the view. If the editor has not loaded, there is nothing to close and it leaves at once; a 5 s fallback avoids ever blocking navigation. Other editors are unchanged.Verification: the cause was verified on iPadOS 26.6 with Text 8.0.0 on Nextcloud 34.0.3. Leaving with ✕ removed the row from
oc_files_lock; leaving with the back button left it there indefinitely. The change itself has not been run on a device yet; it is built and tested by CI here.Fixes nextcloud/text#8858
🤖 AI (if applicable)
Assisted-bytrailer is on the commit)