From 87c3a905e9a2be83400505b62bdb5923e2ed974e Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 13 Oct 2021 10:38:28 +0200 Subject: [PATCH] recognize more mimetypes as documents or archives --- .../pro/fragments/StorageFragment.kt | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/StorageFragment.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/StorageFragment.kt index a2453ada..ed5f0725 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/StorageFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/StorageFragment.kt @@ -29,10 +29,27 @@ class StorageFragment(context: Context, attributeSet: AttributeSet) : MyViewPage // what else should we count as an audio except "audio/*" mimetype private val extraAudioMimeTypes = arrayListOf("application/ogg") private val extraDocumentMimeTypes = arrayListOf( - "application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" + "application/pdf", + "application/msword", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + "application/javascript" ) - private val archiveMimeTypes = arrayListOf("application/zip", "application/x-tar", "application/octet-stream", "application/json") + + private val archiveMimeTypes = + arrayListOf( + "application/zip", + "application/octet-stream", + "application/json", + "application/x-tar", + "application/x-rar-compressed", + "application/x-zip-compressed", + "application/x-7z-compressed", + "application/x-compressed", + "application/x-gzip", + "application/java-archive", + "multipart/x-zip" + ) override fun setupFragment(activity: SimpleActivity) { ensureBackgroundThread {