From 041baa3ae3712cd52d4092df25e2b4f8cad776e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Saleniuk?= <30429749+saleniuk@users.noreply.github.com> Date: Fri, 10 May 2024 07:38:50 +0000 Subject: [PATCH] fix: heavy sketch file (#2992) --- .../com/wire/android/feature/sketch/DrawingCanvasViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/sketch/src/main/java/com/wire/android/feature/sketch/DrawingCanvasViewModel.kt b/features/sketch/src/main/java/com/wire/android/feature/sketch/DrawingCanvasViewModel.kt index f3183943b26..efd3889aefe 100644 --- a/features/sketch/src/main/java/com/wire/android/feature/sketch/DrawingCanvasViewModel.kt +++ b/features/sketch/src/main/java/com/wire/android/feature/sketch/DrawingCanvasViewModel.kt @@ -157,7 +157,7 @@ class DrawingCanvasViewModel : ViewModel() { Bitmap.Config.ARGB_8888 ) val canvas = Canvas(bitmap).apply { drawPaint(Paint().apply { color = Color.White.toArgb() }) } - context.contentResolver.openFileDescriptor(tempSketchFile, "rw")?.use { fileDescriptor -> + context.contentResolver.openFileDescriptor(tempSketchFile, "rwt")?.use { fileDescriptor -> FileOutputStream(fileDescriptor.fileDescriptor).use { fileOutputStream -> paths.forEach { path -> path.drawNative(canvas) } bitmap.compress(Bitmap.CompressFormat.JPEG, QUALITY, fileOutputStream)