Compare commits
3 Commits
develop
...
feature/me
Author | SHA1 | Date |
---|---|---|
Benoit Marty | 562a02a796 | |
Benoit Marty | ac31bbdb1b | |
Benoit Marty | 0fb6dd592e |
|
@ -97,19 +97,16 @@ class AttachmentsHelper private constructor(private val context: Context,
|
|||
// Restorable
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
capturePath?.also {
|
||||
capturePath?.let {
|
||||
outState.putString(CAPTURE_PATH_KEY, it)
|
||||
}
|
||||
pendingType?.also {
|
||||
pendingType?.let {
|
||||
outState.putSerializable(PENDING_TYPE_KEY, it)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onRestoreInstanceState(savedInstanceState: Bundle?) {
|
||||
capturePath = savedInstanceState?.getString(CAPTURE_PATH_KEY)
|
||||
if (capturePath != null) {
|
||||
cameraImagePicker.reinitialize(capturePath)
|
||||
}
|
||||
pendingType = savedInstanceState?.getSerializable(PENDING_TYPE_KEY) as? AttachmentTypeSelectorView.Type
|
||||
}
|
||||
|
||||
|
|
|
@ -51,12 +51,16 @@ class ActivityPickerManagerFactory(private val activity: Activity, callback: Att
|
|||
return ImagePicker(activity).also {
|
||||
it.setImagePickerCallback(attachmentsPickerCallback)
|
||||
it.allowMultiple()
|
||||
it.shouldGenerateMetadata(true)
|
||||
it.shouldGenerateThumbnails(false)
|
||||
}
|
||||
}
|
||||
|
||||
override fun createCameraImagePicker(): CameraImagePicker {
|
||||
return CameraImagePicker(activity).also {
|
||||
it.setImagePickerCallback(attachmentsPickerCallback)
|
||||
it.shouldGenerateMetadata(true)
|
||||
it.shouldGenerateThumbnails(false)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,6 +68,8 @@ class ActivityPickerManagerFactory(private val activity: Activity, callback: Att
|
|||
return VideoPicker(activity).also {
|
||||
it.setVideoPickerCallback(attachmentsPickerCallback)
|
||||
it.allowMultiple()
|
||||
it.shouldGenerateMetadata(true)
|
||||
it.shouldGeneratePreviewImages(false)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,12 +102,16 @@ class FragmentPickerManagerFactory(private val fragment: Fragment, callback: Att
|
|||
return ImagePicker(fragment).also {
|
||||
it.setImagePickerCallback(attachmentsPickerCallback)
|
||||
it.allowMultiple()
|
||||
it.shouldGenerateMetadata(true)
|
||||
it.shouldGenerateThumbnails(false)
|
||||
}
|
||||
}
|
||||
|
||||
override fun createCameraImagePicker(): CameraImagePicker {
|
||||
return CameraImagePicker(fragment).also {
|
||||
it.setImagePickerCallback(attachmentsPickerCallback)
|
||||
it.shouldGenerateMetadata(true)
|
||||
it.shouldGenerateThumbnails(false)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -109,6 +119,8 @@ class FragmentPickerManagerFactory(private val fragment: Fragment, callback: Att
|
|||
return VideoPicker(fragment).also {
|
||||
it.setVideoPickerCallback(attachmentsPickerCallback)
|
||||
it.allowMultiple()
|
||||
it.shouldGenerateMetadata(true)
|
||||
it.shouldGeneratePreviewImages(false)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue