diff --git a/app/build.gradle b/app/build.gradle index ac8ad687f..23e4b1324 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -333,7 +333,7 @@ dependencies { // implementation 'androidx.activity:activity-ktx:1.4.0' // TODO substitute for tag after first common release - implementation 'com.github.nextcloud.android-common:ui:83c4a8aa885e8ef1bba2e44704be8625db396e1b' + implementation 'com.github.nextcloud.android-common:ui:82f6da3e9638e7578a8df8f6e52884e2923b2760' } task installGitHooks(type: Copy, group: "development") { diff --git a/app/src/main/java/com/nextcloud/talk/ui/theme/TalkSpecificViewThemeUtils.kt b/app/src/main/java/com/nextcloud/talk/ui/theme/TalkSpecificViewThemeUtils.kt index a1f94460a..54cf257ab 100644 --- a/app/src/main/java/com/nextcloud/talk/ui/theme/TalkSpecificViewThemeUtils.kt +++ b/app/src/main/java/com/nextcloud/talk/ui/theme/TalkSpecificViewThemeUtils.kt @@ -43,7 +43,6 @@ import androidx.core.graphics.drawable.DrawableCompat import androidx.core.view.ViewCompat import androidx.core.view.children import com.google.android.material.card.MaterialCardView -import com.google.android.material.chip.ChipDrawable import com.nextcloud.android.common.ui.theme.MaterialSchemes import com.nextcloud.android.common.ui.theme.ViewThemeUtilsBase import com.nextcloud.android.common.ui.theme.utils.AndroidXViewThemeUtils @@ -59,7 +58,6 @@ import kotlin.math.roundToInt /** * View theme utils specific for the Talk app. * - * TODO some of these can be renamed and made generic */ @Suppress("TooManyFunctions") class TalkSpecificViewThemeUtils @Inject constructor( @@ -216,13 +214,6 @@ class TalkSpecificViewThemeUtils @Inject constructor( return drawable } - fun themePrimaryMentionChip(context: Context, chip: ChipDrawable) { - withScheme(context) { scheme -> - chip.chipBackgroundColor = ColorStateList.valueOf(scheme.primary) - chip.setTextColor(scheme.onPrimary) - } - } - fun themeSearchView(searchView: SearchView) { withScheme(searchView) { scheme -> // hacky as no default way is provided diff --git a/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java b/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java index 1e5f48c54..3f3d2ed9b 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java +++ b/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java @@ -304,7 +304,7 @@ public class DisplayUtils { chip.setEllipsize(TextUtils.TruncateAt.MIDDLE); if (chipResource == R.xml.chip_you) { - viewThemeUtils.talk.themePrimaryMentionChip(context, chip); + viewThemeUtils.material.colorChipDrawable(context, chip); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { diff --git a/settings.gradle b/settings.gradle index ba13dd9ac..bb0692b16 100644 --- a/settings.gradle +++ b/settings.gradle @@ -20,3 +20,9 @@ include ':app' +//// uncomment to use local build of common-ui +//includeBuild('../android-common') { +// dependencySubstitution { +// substitute module('com.github.nextcloud.android-common:ui') using project(':ui') +// } +//}