mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
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:
parent
bbea0e00d0
commit
929b704425
1 changed files with 3 additions and 10 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue