Can't disable opening pdf files on the mobile Nextcloud app
- Dominant language
- Kotlin
- Stars
- 5.6k
- Forks
- 2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 92
Description
### ⚠️ Before posting ⚠️
- [X] This is a **bug**, not a question or an enhancement.
- [X] I've [searched for similar issues](https://github.com/nextcloud/android/issues) and didn't find a duplicate.
- [X] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [X] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).
### Steps to reproduce
File is being opened by default when clicked on its name even if it is indicated to not open the file format by default in the ONLYOFFICE connector settings in Nextcloud, for example PDF. We checked from our end that our connector is passing the correct data as per documentation [here](https://github.com/nextcloud/server/pull/17625).
In mimetypes we are [passing](https://github.com/ONLYOFFICE/onlyoffice-nextcloud/blob/master/lib/DirectEditor.php#L137-L152) the default data (the checked checkbox in the connector settings), for example:
```
"mimetypes":[
"application\/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"application\/vnd.openxmlformats-officedocument.presentationml.presentation"
],
```
In optionalMimetypes we are [passing](https://github.com/ONLYOFFICE/onlyoffice-nextcloud/blob/master/lib/DirectEditor.php#L159-L174) other supported mimetypes like:
```
"optionalMimetypes":[
"application\/pdf",
...
```
Shown on PDF format example, it is being moved from one list to another when the checkbox is checked/unchecked in the connector settings. It seems that Nextcloud app is not handling these lists properly.
Issue https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/1015 described in our repo.
### Expected behaviour
File is not opened
### Actual behaviour
File is opened even if the checkbox for the chosen file format is unchecked in the ONLYOFFICE connector settings
### Android version
Android 14
### Device brand and model
Google Pixel 8
### Stock or custom OS?
Stock
### Nextcloud android app version
Nextcloud Android App 3.29.1
### Nextcloud server version
Nextcloud 29.0.4
### Using a reverse proxy?
I don't know
### Android logs
_No response_
### Server error logs
_No response_
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.