Tapping a downloaded file skips the configured Direct Editing editor (e.g. PDF opens in an external app instead)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从OCFileListFragment.onFileClicked()开始,比较已下载和未下载文件的处理路径,尤其是现有的hasTextEditor(file)检查。查看FileDisplayActivity.previewFile()和FileActionHandler.edit(),了解当前的预览和编辑器行为。完成标准是:点击已下载的文件时,如果配置了Direct Editing编辑器且可用,就会打开该编辑器,同时保留离线预览作为备用方案。
由索引模型根据 Issue 内容生成。
描述
How to use GitHub
- Please use the 👍 reaction to show that you are interested into the same feature.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Is your feature request related to a problem? Please describe.
What happens when I tap a file depends on whether it is already downloaded to the device:
- Not downloaded: if a Direct Editing editor lists the file's mimetype as supported, the app opens that editor in its web view (
OCFileListFragment.openFile(),hasTextEditor()branch). - Downloaded:
onFileClicked()goes topreviewFile()instead and never checks for an editor. For PDFs,previewFile()callsstartPdfPreview(), which prefers third party PDF apps, so the file opens in the system PDF viewer.
So the same tap on the same file opens the server's editor the first time and an external app once the file is cached. My use case: a server app that registers a Direct Editing editor for application/pdf (annotating construction plans). On a tablet, the editor opens fine until the file has been downloaded once; after that, tapping it opens the external PDF viewer. Edit in the file menu still opens the editor (FileActionHandler.edit()), but tapping is what users do.
Reading the code, the same seems to apply to other editors, e.g. a downloaded Markdown file would go to the internal text preview instead of the Text app's editor. I have only observed the PDF case.
Describe the solution you'd like
When a Direct Editing editor lists the mimetype in its (non-optional) mimetypes, tapping a file opens that editor whether or not the file is downloaded. In code: apply the same webViewAvailable && hasTextEditor(file) && !file.isEncrypted check in onFileClicked() before the file.isDown branch (or at the start of previewFile()). Offline, the current preview could stay as the fallback.
Describe alternatives you've considered
- Using Edit from the file menu every time: works, but is not discoverable and differs from the non-downloaded case.
- Uninstalling or changing the default PDF app on the device: then the internal PDF preview opens, still not the editor.
- A setting "Open files with the server editor when available": would also work, but the consistent behaviour above seems simpler.
Additional context
- Observed on a live instance: Nextcloud server 35.0.3, Nextcloud Android app , , Android .
- The editor is registered via
RegisterDirectEditorEventand appears in/ocs/v2.php/apps/files/api/v1/directEditingwithapplication/pdfinmimetypes.
Assisted by ClaudeCode:claude-opus-5-5
- 主要语言
- Kotlin
- 星标
- 5.7k
- 派生
- 2.1k
- 平均合并
- 2 天 7 小时
- 30 天内合并 PR
- 149
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nextcloud/android 的其他 Issue
-
0. Needs triage enhancement
难度 2/5 1-3 小时 新手友好度 68/100
nextcloud/android#18094 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 86/100
nextcloud/android#17845 · 2 条评论 ·
维护者通常 1 天内回复
-
[Bug] Lock owned by another client (e.g. Text app) cannot be unlocked from the app可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
nextcloud/android#17837 · 2 个 reaction ·
维护者通常 1 天内回复
-
0. Needs triage
难度 2/5 1-3 小时 新手友好度 84/100
nextcloud/android#17533 · 1 条评论 ·
维护者通常 1 天内回复
-
RC 34.1.0-01: Duplicated wording in creation menu — "New" prefix + creator name produces "New New document" ("Neu Neues Dokument")可能已有人在做 @ChristianTannheimer 于 129 天前认领。 未关闭0. Needs triage bug
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
查看 nextcloud/android 的全部 Issue
相似的 Issue
-
accessibility agent-ready area:android bug fleet
难度 2/5 1-3 小时 新手友好度 77/100
level-98/mailcrane#412 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 2 天内回复
-
help wanted
难度 2/5 1-3 小时 新手友好度 88/100
DojoCodingLabs/hermit#23 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
signalapp/Signal-Android#15148 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复