Skip to content

Commit f64a75a

Browse files
committed
feat: fix dissmiss when PHPhotoLibrary.shared().presentLimitedLibraryPicker dissmiss
1 parent f77814a commit f64a75a

File tree

7 files changed

+21
-9
lines changed

7 files changed

+21
-9
lines changed

bun.lockb

544 KB
Binary file not shown.

example/bun.lockb

358 KB
Binary file not shown.

example/ios/Podfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ target 'MultipleImagePickerExample' do
5050
:mac_catalyst_enabled => false
5151
)
5252

53+
installer.pods_project.targets.each do |target|
54+
target.build_configurations.each do |config|
55+
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']
56+
57+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.4'
58+
59+
end
60+
end
5361
__apply_Xcode_12_5_M1_post_install_workaround(installer)
5462
end
5563
end

example/ios/Podfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,12 @@ PODS:
330330
- React-jsinspector (0.71.5)
331331
- React-logger (0.71.5):
332332
- glog
333-
- react-native-multiple-image-picker (1.1.1):
333+
- react-native-multiple-image-picker (1.1.3):
334334
- CropViewController (= 2.6.1)
335335
- React-Core
336-
- react-native-multiple-image-picker/Viewer (= 1.1.1)
336+
- react-native-multiple-image-picker/Viewer (= 1.1.3)
337337
- TLPhotoPicker (= 2.1.9)
338-
- react-native-multiple-image-picker/Viewer (1.1.1):
338+
- react-native-multiple-image-picker/Viewer (1.1.3):
339339
- CropViewController (= 2.6.1)
340340
- React-Core
341341
- TLPhotoPicker (= 2.1.9)
@@ -618,7 +618,7 @@ SPEC CHECKSUMS:
618618
React-jsiexecutor: 1579bf3207afadc72ac3638a66a102d1bf5263e3
619619
React-jsinspector: 14a342151ab810862998dfc99e2720746734e9b3
620620
React-logger: 94ec392ae471683635e4bf874d4e82f675399d2d
621-
react-native-multiple-image-picker: c55a7b2e2eb7562c6d395d09e413194d2d1c4179
621+
react-native-multiple-image-picker: 5a00e1b775cd483a4a5622c73a8ca45cb77571dd
622622
React-perflogger: 883a55a9a899535eaf06d0029108ef9ef22cce92
623623
React-RCTActionSheet: 1a3b8416688a3d291367be645022886f71d6842a
624624
React-RCTAnimation: e5560cb72d91ba35151d51e2eb0d467b42763f43
@@ -637,6 +637,6 @@ SPEC CHECKSUMS:
637637
Yoga: cd7d7f509dbfac14ee7f31a6c750acb957cd5022
638638
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
639639

640-
PODFILE CHECKSUM: 6d9a33a733d45e760ee620ed2212ec8bb8dc8391
640+
PODFILE CHECKSUM: 01c5b72a821a91dcd3e65acb1f6749eccfe7d6ff
641641

642-
COCOAPODS: 1.12.1
642+
COCOAPODS: 1.13.0

ios/MultipleImagePicker.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,12 @@ class MultipleImagePicker: NSObject, UINavigationControllerDelegate {
7878
let topViewController = self.getTopMostViewController()!
7979
var show = 0
8080

81-
PHPhotoLibrary.shared().presentLimitedLibraryPicker(from: topViewController) { _ in
81+
PHPhotoLibrary.shared().presentLimitedLibraryPicker(from: topViewController) { log in
82+
if(log.isEmpty){
83+
topViewController.dismiss(animated: true)
84+
return
85+
}
86+
8287
show += 1 // presentLimitedLibraryPicker run twice and I DONT KNOWWWWW...
8388
if show == 1 {
8489
topViewController.dismiss(animated: true) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@baronha/react-native-multiple-image-picker",
3-
"version": "1.1.3",
3+
"version": "1.1.4",
44
"description": "react-native-multiple-image-picker enables application to pick images and videos from multiple smart album in iOS/Android, similar to the current facebook app.",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"allowUnreachableCode": false,
88
"allowUnusedLabels": false,
99
"esModuleInterop": true,
10-
"importsNotUsedAsValues": "error",
1110
"forceConsistentCasingInFileNames": true,
1211
"jsx": "react",
1312
"lib": ["esnext"],

0 commit comments

Comments
 (0)