mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-22 04:55:29 +03:00
fix to switch background color between incoming&outgoing reaction
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
f53f9381b8
commit
a0a388cc07
1 changed files with 4 additions and 4 deletions
|
@ -164,18 +164,18 @@ class TalkSpecificViewThemeUtils @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
fun setCheckedBackground(linearLayout: LinearLayout, incoming: Boolean) {
|
||||
fun setCheckedBackground(linearLayout: LinearLayout, outgoing: Boolean) {
|
||||
withScheme(linearLayout) { scheme ->
|
||||
val drawable = AppCompatResources
|
||||
.getDrawable(linearLayout.context, R.drawable.reaction_self_background)!!
|
||||
.mutate()
|
||||
val backgroundColor = if (incoming) {
|
||||
dynamicColor.primaryContainer().getArgb(scheme)
|
||||
} else {
|
||||
val backgroundColor = if (outgoing) {
|
||||
ContextCompat.getColor(
|
||||
linearLayout.context,
|
||||
R.color.bg_message_list_incoming_bubble
|
||||
)
|
||||
} else {
|
||||
dynamicColor.primaryContainer().getArgb(scheme)
|
||||
}
|
||||
DrawableCompat.setTintList(
|
||||
drawable,
|
||||
|
|
Loading…
Reference in a new issue