Skip to content

Commit

Permalink
fix(dialog): iOS file picker default to file selection instead of pho…
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored and Sir-Thom committed Oct 22, 2024
1 parent e3a7608 commit 8bb1ec4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/fix-ios-file-dialog-default-mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"dialog": patch:breaking
---

If no filters are specified, the file picker dialog now defaults to a file selection instead of photos.
2 changes: 1 addition & 1 deletion plugins/dialog/ios/Sources/DialogPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class DialogPlugin: Plugin {

let parsedTypes = parseFiltersOption(args.filters ?? [])

var isMedia = true
var isMedia = !parsedTypes.isEmpty
var uniqueMimeType: Bool? = nil
var mimeKind: String? = nil
if !parsedTypes.isEmpty {
Expand Down

0 comments on commit 8bb1ec4

Please sign in to comment.