File tree 2 files changed +7
-4
lines changed
picker-core/src/jvmMain/kotlin/io/github/vinceglb/picker/core/platform/windows
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,13 @@ import io.github.vinceglb.picker.core.platform.windows.api.JnaFileChooser
5
5
import java.io.File
6
6
7
7
internal class WindowsFilePicker : PlatformFilePicker {
8
- private val fileChooser = JnaFileChooser ()
9
-
10
8
override suspend fun pickFile (
11
9
initialDirectory : String? ,
12
10
fileExtensions : List <String >? ,
13
11
title : String?
14
12
): File ? {
13
+ val fileChooser = JnaFileChooser ()
14
+
15
15
// Setup file chooser
16
16
fileChooser.apply {
17
17
// Set mode
@@ -36,6 +36,8 @@ internal class WindowsFilePicker : PlatformFilePicker {
36
36
fileExtensions : List <String >? ,
37
37
title : String?
38
38
): List <File >? {
39
+ val fileChooser = JnaFileChooser ()
40
+
39
41
// Setup file chooser
40
42
fileChooser.apply {
41
43
// Set mode
@@ -58,6 +60,8 @@ internal class WindowsFilePicker : PlatformFilePicker {
58
60
}
59
61
60
62
override fun pickDirectory (initialDirectory : String? , title : String? ): File ? {
63
+ val fileChooser = JnaFileChooser ()
64
+
61
65
// Setup file chooser
62
66
fileChooser.apply {
63
67
// Set mode
Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ import javax.swing.filechooser.FileNameExtensionFilter
28
28
*
29
29
* @see JFileChooser, WindowsFileChooser, WindowsFileBrowser
30
30
*/
31
- internal class JnaFileChooser
32
- () {
31
+ internal class JnaFileChooser () {
33
32
private enum class Action {
34
33
Open , Save
35
34
}
You can’t perform that action at this time.
0 commit comments