From 05f99b49ba4d4e385a534189c96fd03367e5608f Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 13 Oct 2021 12:23:35 +0200 Subject: [PATCH] moving the extra mimetypes into the Constants file --- .../pro/fragments/StorageFragment.kt | 24 ------------------- .../filemanager/pro/helpers/Constants.kt | 24 +++++++++++++++++++ 2 files changed, 24 insertions(+), 24 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 c704f236..669850d3 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 @@ -23,30 +23,6 @@ import kotlin.collections.HashMap class StorageFragment(context: Context, attributeSet: AttributeSet) : MyViewPagerFragment(context, attributeSet) { private val SIZE_DIVIDER = 100000 - // 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/javascript" - ) - - 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) { total_space.text = String.format(context.getString(R.string.total_storage), "…") diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/helpers/Constants.kt index df113a02..8c6b99df 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/helpers/Constants.kt @@ -41,3 +41,27 @@ const val DOCUMENTS = "documents" const val ARCHIVES = "archives" const val OTHERS = "others" const val SHOW_MIMETYPE = "show_mimetype" + +// what else should we count as an audio except "audio/*" mimetype +val extraAudioMimeTypes = arrayListOf("application/ogg") +val extraDocumentMimeTypes = arrayListOf( + "application/pdf", + "application/msword", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + "application/javascript" +) + +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" +)