You've already forked joplin
							
							
				mirror of
				https://github.com/laurent22/joplin.git
				synced 2025-10-31 00:07:48 +02:00 
			
		
		
		
	Merge branch 'release-2.9' into dev
This commit is contained in:
		| @@ -38,8 +38,7 @@ const { dialogs } = require('../../utils/dialogs.js'); | |||||||
| const DialogBox = require('react-native-dialogbox').default; | const DialogBox = require('react-native-dialogbox').default; | ||||||
| const ImageResizer = require('react-native-image-resizer').default; | const ImageResizer = require('react-native-image-resizer').default; | ||||||
| const shared = require('@joplin/lib/components/shared/note-screen-shared.js'); | const shared = require('@joplin/lib/components/shared/note-screen-shared.js'); | ||||||
| const ImagePicker = require('react-native-image-picker').default; | import { ImagePickerResponse, launchImageLibrary } from 'react-native-image-picker'; | ||||||
| import { ImagePickerResponse } from 'react-native-image-picker'; |  | ||||||
| import SelectDateTimeDialog from '../SelectDateTimeDialog'; | import SelectDateTimeDialog from '../SelectDateTimeDialog'; | ||||||
| import ShareExtension from '../../utils/ShareExtension.js'; | import ShareExtension from '../../utils/ShareExtension.js'; | ||||||
| import CameraView from '../CameraView'; | import CameraView from '../CameraView'; | ||||||
| @@ -562,14 +561,6 @@ class NoteScreenComponent extends BaseScreenComponent { | |||||||
| 		}); | 		}); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	showImagePicker(options: any) { |  | ||||||
| 		return new Promise((resolve) => { |  | ||||||
| 			ImagePicker.launchImageLibrary(options, (response: any) => { |  | ||||||
| 				resolve(response); |  | ||||||
| 			}); |  | ||||||
| 		}); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	async resizeImage(localFilePath: string, targetPath: string, mimeType: string) { | 	async resizeImage(localFilePath: string, targetPath: string, mimeType: string) { | ||||||
| 		const maxSize = Resource.IMAGE_MAX_DIMENSION; | 		const maxSize = Resource.IMAGE_MAX_DIMENSION; | ||||||
|  |  | ||||||
| @@ -720,7 +711,7 @@ class NoteScreenComponent extends BaseScreenComponent { | |||||||
|  |  | ||||||
| 	private async attachPhoto_onPress() { | 	private async attachPhoto_onPress() { | ||||||
| 		// the selection Limit should be specfied. I think 200 is enough? | 		// the selection Limit should be specfied. I think 200 is enough? | ||||||
| 		const response: ImagePickerResponse = await this.showImagePicker({ mediaType: 'photo', includeBase64: false, selectionLimit: 200 }); | 		const response: ImagePickerResponse = await launchImageLibrary({ mediaType: 'photo', includeBase64: false, selectionLimit: 200 }); | ||||||
|  |  | ||||||
| 		if (response.errorCode) { | 		if (response.errorCode) { | ||||||
| 			reg.logger().warn('Got error from picker', response.errorCode); | 			reg.logger().warn('Got error from picker', response.errorCode); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user