Tapping a downloaded file skips the configured Direct Editing editor (e.g. PDF opens in an external app instead)
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 82/100
Direção de pesquisa
Comece por OCFileListFragment.onFileClicked() e compare os caminhos para arquivos baixados e não baixados, especialmente a verificação existente hasTextEditor(file). Confira FileDisplayActivity.previewFile() e FileActionHandler.edit() para entender o comportamento atual da visualização e do editor. O trabalho está concluído quando tocar em um arquivo baixado abre o editor configurado de Direct Editing, quando disponível, enquanto a visualização offline continua sendo uma alternativa.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Kotlin
- Estrelas
- 5.7k
- Forks
- 2.1k
- Merge médio
- 2d 7h
- PRs com merge (30d)
- 149
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de nextcloud/android
-
0. Needs triage enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
nextcloud/android#18094 · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 86/100
nextcloud/android#17845 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
[Bug] Lock owned by another client (e.g. Text app) cannot be unlocked from the appTalvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
nextcloud/android#17837 · 2 reações ·
Mantenedores costumam responder em até 1 dia
-
0. Needs triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
nextcloud/android#17533 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
RC 34.1.0-01: Duplicated wording in creation menu — "New" prefix + creator name produces "New New document" ("Neu Neues Dokument")Talvez já em andamento @ChristianTannheimer assumiu há 129 dias. Aberta0. Needs triage bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia
Todas as issues de nextcloud/android
Issues semelhantes
-
accessibility agent-ready area:android bug fleet
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
level-98/mailcrane#412 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 2 dias
-
help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
DojoCodingLabs/hermit#23 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
signalapp/Signal-Android#15148 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia