From 5b38986378637300d3a47c56d3ddade102634f52 Mon Sep 17 00:00:00 2001 From: Vincent TE Date: Thu, 14 Nov 2024 15:50:54 +0100 Subject: [PATCH] chore: Revert modification --- .../java/com/infomaniak/swisstransfer/ui/utils/FileUiExt.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/utils/FileUiExt.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/utils/FileUiExt.kt index 5b9d485b7..1ae514a8e 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/utils/FileUiExt.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/utils/FileUiExt.kt @@ -20,6 +20,6 @@ package com.infomaniak.swisstransfer.ui.utils import com.infomaniak.library.filetypes.FileType import com.infomaniak.multiplatform_swisstransfer.common.interfaces.ui.FileUi -val FileUi.fileType: FileType get() = FileType.guessFromFileName(fileName) +val FileUi.fileType: FileType get() = mimeType?.let { FileType.guessFromMimeType(it) } ?: FileType.guessFromFileName(fileName) val FileUi.hasPreview: Boolean get() = fileType == FileType.IMAGE