Use overlay method for ShortcutUtil

Signed-off-by: Alper Ozturk <alperozturk@lions-macbook.local>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
Alper Ozturk 2023-10-03 14:34:32 +02:00 committed by alperozturk
parent bbea0e00d0
commit 929b704425
No known key found for this signature in database
GPG key ID: 4E577DC593B59BDF

View file

@ -71,16 +71,9 @@ class ShortcutUtil @Inject constructor(private val mContext: Context) {
thumbnail = bitmapToAdaptiveBitmap(thumbnail)
icon = IconCompat.createWithAdaptiveBitmap(thumbnail)
} else if (file.isFolder) {
val bitmapIcon = MimeTypeUtil.getFolderTypeIcon(
file.isSharedWithMe || file.isSharedWithSharee,
file.isSharedViaLink,
file.isEncrypted,
syncedFolderProvider.findByRemotePathAndAccount(file.remotePath, user),
file.isGroupFolder,
file.mountType,
mContext,
viewThemeUtils
).toBitmap()
val isAutoUploadFolder = SyncedFolderProvider.isAutoUploadFolder(syncedFolderProvider, file, user)
val drawable = file.getFileLayerDrawable(isAutoUploadFolder, mContext, viewThemeUtils)
val bitmapIcon = drawable.toBitmap()
icon = IconCompat.createWithBitmap(bitmapIcon)
} else {
icon = IconCompat.createWithResource(