From d607153eb17e8c4c60476024d77e1a52dae056ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Saleniuk?= Date: Fri, 10 May 2024 08:56:18 +0200 Subject: [PATCH] fix: heavy sketch file --- .../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)