From f537920626e05629571b7d1a498dbacd16fe145b Mon Sep 17 00:00:00 2001 From: Gleidson Daniel Date: Thu, 15 Sep 2022 15:49:46 -0300 Subject: [PATCH] remove default param --- app/containers/MessageBox/index.tsx | 5 ++--- app/lib/methods/mediaPicker.ts | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/containers/MessageBox/index.tsx b/app/containers/MessageBox/index.tsx index f6a822eed..b144b1606 100644 --- a/app/containers/MessageBox/index.tsx +++ b/app/containers/MessageBox/index.tsx @@ -163,7 +163,6 @@ class MessageBox extends Component { this.text = ''; this.selection = { start: 0, end: 0 }; this.focused = false; - } get sendThreadToChannel() { @@ -692,7 +691,7 @@ class MessageBox extends Component { takePhoto = async () => { logEvent(events.ROOM_BOX_ACTION_PHOTO); try { - const image = await pickImageFromCamera(true); + const image = await pickImageFromCamera(); if (image && this.canUploadFile(image)) { this.openShareView([image]); } @@ -704,7 +703,7 @@ class MessageBox extends Component { takeVideo = async () => { logEvent(events.ROOM_BOX_ACTION_VIDEO); try { - const video = await pickVideoFromCamera(true); + const video = await pickVideoFromCamera(); if (video && this.canUploadFile(video)) { this.openShareView([video]); } diff --git a/app/lib/methods/mediaPicker.ts b/app/lib/methods/mediaPicker.ts index f3b6e1d23..d9ffee685 100644 --- a/app/lib/methods/mediaPicker.ts +++ b/app/lib/methods/mediaPicker.ts @@ -111,8 +111,8 @@ export async function pickImageFromLibrary({ animatedGif = true }: { animatedGif } } -export const pickVideoFromCamera = (allowsEditing = false): Promise => +export const pickVideoFromCamera = (allowsEditing = true): Promise => pickFromCamera(allowsEditing, ImagePicker.MediaTypeOptions.Videos); -export const pickImageFromCamera = (allowsEditing = false): Promise => +export const pickImageFromCamera = (allowsEditing = true): Promise => pickFromCamera(allowsEditing, ImagePicker.MediaTypeOptions.Images);