From c386471683543a18ea7f5986711f773a5a3a3e09 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Tue, 14 Jan 2025 12:07:55 +0100 Subject: [PATCH] fix after rebase Signed-off-by: tobiasKaminsky --- .../fragment/OCFileListFragmentStaticServerIT.kt | 5 +++-- .../android/ui/adapter/OCFileListAdapter.java | 12 ++++++++---- build.gradle | 2 +- gradle/verification-metadata.xml | 16 ++++++++++++++++ 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/app/src/androidTest/java/com/owncloud/android/ui/fragment/OCFileListFragmentStaticServerIT.kt b/app/src/androidTest/java/com/owncloud/android/ui/fragment/OCFileListFragmentStaticServerIT.kt index 36df6af4366b..9589d98f0218 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/fragment/OCFileListFragmentStaticServerIT.kt +++ b/app/src/androidTest/java/com/owncloud/android/ui/fragment/OCFileListFragmentStaticServerIT.kt @@ -15,6 +15,7 @@ import com.owncloud.android.AbstractIT import com.owncloud.android.datamodel.OCFile import com.owncloud.android.lib.resources.shares.ShareType import com.owncloud.android.lib.resources.shares.ShareeUser +import com.owncloud.android.lib.resources.systemTag.SystemTag import com.owncloud.android.utils.MimeType import com.owncloud.android.utils.ScreenshotTest import org.junit.Assert @@ -50,7 +51,7 @@ class OCFileListFragmentStaticServerIT : AbstractIT() { fileLength = 3072000 modificationTimestamp = 746443755000 parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId - tags = listOf("Top secret") + tags = listOf(SystemTag("Top secret", null)) sut.storageManager.saveFile(this) } @@ -72,7 +73,7 @@ class OCFileListFragmentStaticServerIT : AbstractIT() { fileLength = 12092000 modificationTimestamp = 746143952000 parentId = sut.storageManager.getFileByEncryptedRemotePath("/").fileId - tags = listOf("Confidential", "+5") + tags = listOf(SystemTag("Confidential", null), SystemTag("+5", null)) sut.storageManager.saveFile(this) } diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java index ed07171aa310..45a5aa968b5b 100644 --- a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java +++ b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java @@ -655,13 +655,17 @@ private void applyChipVisuals(Chip chip, SystemTag tag) { viewThemeUtils.material.themeChipSuggestion(chip); chip.setText(tag.getName()); - if (tag.getColor() == null) { + if (tag.getColor() == null || tag.getColor().isEmpty()) { return; } - int color = Color.parseColor(tag.getColor()); - chip.setChipStrokeColor(ColorStateList.valueOf(color)); - chip.setTextColor(color); + try { + int color = Color.parseColor(tag.getColor()); + chip.setChipStrokeColor(ColorStateList.valueOf(color)); + chip.setTextColor(color); + } catch (IllegalArgumentException e) { + // do nothing + } } private void prepareFileSize(ListItemViewHolder holder, OCFile file, long size) { diff --git a/build.gradle b/build.gradle index a2662b0d3c24..cd61e8a78976 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ */ buildscript { ext { - androidLibraryVersion ="24744f9235fa9446fa314f66e753fab5f9554313" + androidLibraryVersion ="1b59a97bdbbf2160236880e6cb02933e3bd441a1" androidPluginVersion = '8.8.0' androidxMediaVersion = '1.5.1' androidxTestVersion = "1.6.1" diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 4df6cd625ee8..09a831335c6a 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -9096,6 +9096,22 @@ + + + + + + + + + + + + + + + +