Give groupfolders priority when choosing icon for folder

In the server UI, a groupfolder that also has a link shows as a groupfolder.
In the app, it shows as a link. This fixes that.

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey 2022-11-08 10:59:31 +01:00
parent ae802cd27d
commit fe3a6e6790
No known key found for this signature in database
GPG key ID: 2585783189A62105

View file

@ -142,7 +142,9 @@ public final class MimeTypeUtil {
ViewThemeUtils viewThemeUtils) {
int drawableId;
if (isSharedViaLink) {
if (WebdavEntry.MountType.GROUP == mountType || isGroupFolder) {
drawableId = R.drawable.folder_group;
} else if (isSharedViaLink) {
drawableId = R.drawable.folder_shared_link;
} else if (isSharedViaUsers) {
drawableId = R.drawable.folder_shared_users;
@ -150,8 +152,6 @@ public final class MimeTypeUtil {
drawableId = R.drawable.folder_encrypted;
} else if (WebdavEntry.MountType.EXTERNAL == mountType) {
drawableId = R.drawable.folder_external;
} else if (WebdavEntry.MountType.GROUP == mountType || isGroupFolder) {
drawableId = R.drawable.folder_group;
} else {
drawableId = R.drawable.folder;
}