Skip to content

Commit

Permalink
[Fix] Make supportsThumbnail support media for remote providers as well.
Browse files Browse the repository at this point in the history
Bug: #683
  • Loading branch information
zhanghai committed Sep 15, 2023
1 parent 08135e3 commit b0987f1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import me.zhanghai.android.files.provider.linux.isLinuxPath
import me.zhanghai.android.files.settings.Settings
import me.zhanghai.android.files.util.asFileName
import me.zhanghai.android.files.util.isGetPackageArchiveInfoCompatible
import me.zhanghai.android.files.util.isMediaMetadataRetrieverCompatible
import me.zhanghai.android.files.util.valueCompat
import java.text.CollationKey

Expand Down Expand Up @@ -70,7 +71,7 @@ val FileItem.supportsThumbnail: Boolean
return when {
mimeType.isApk && path.isGetPackageArchiveInfoCompatible -> true
mimeType.isImage -> true
mimeType.isMedia && (path.isLinuxPath || path.isDocumentPath) -> true
mimeType.isMedia && path.isMediaMetadataRetrieverCompatible -> true
mimeType.isPdf && (path.isLinuxPath || path.isDocumentPath) ->
Build.VERSION.SDK_INT >= Build.VERSION_CODES.P
|| Settings.SHOW_PDF_THUMBNAIL_PRE_28.valueCompat
Expand Down

0 comments on commit b0987f1

Please sign in to comment.