mirror of
https://github.com/vector-im/riotX-android
synced 2025-10-06 00:02:48 +02:00
Compare commits
3 Commits
v1.6.46
...
feature/me
Author | SHA1 | Date | |
---|---|---|---|
|
562a02a796 | ||
|
ac31bbdb1b | ||
|
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)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user