Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0af835c authored by Fahim Salam Chowdhury's avatar Fahim Salam Chowdhury
Browse files

Update messageListItem onLongPress colors

issue: https://gitlab.e.foundation/e/backlog/-/issues/4723

- remove checked icon showing on message selected state
- update background color of message on-selected stage to color_default_gray1 for light-mode & color_default_gray2 for dark-mode for better visibility
- update messageList preview text color to secondary text color for better visibility
- update messageList item on-active background color to accent color
- change message threadCount background box color to secondary text color for better visibility
parent 96a3bc34
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="color_message_list_selected_background">@color/color_default_gray2</color>
</resources>
 No newline at end of file
+4 −0
Original line number Diff line number Diff line
@@ -8,4 +8,8 @@
    <color name="color_default_primary_text">@lineageos.platform:color/color_default_primary_text</color>
    <color name="color_default_secondary_text">@lineageos.platform:color/color_default_secondary_text</color>
    <color name="color_default_divider">@lineageos.platform:color/color_default_divider</color>
    <color name="color_default_gray1">@lineageos.platform:color/color_default_gray1</color>
    <color name="color_default_gray2">@lineageos.platform:color/color_default_gray2</color>

    <color name="color_message_list_selected_background">@color/color_default_gray1</color>
</resources>
 No newline at end of file
+6 −6
Original line number Diff line number Diff line
@@ -86,13 +86,13 @@
        <item name="iconSettingsImportStatus">@drawable/ic_import_status</item>
        <item name="textColorPrimaryRecipientDropdown">@color/color_default_primary_text</item>
        <item name="textColorSecondaryRecipientDropdown">@color/color_default_secondary_text</item>
        <item name="messageListSelectedBackgroundColor">#8038B8E2</item>
        <item name="messageListSelectedBackgroundColor">@color/color_message_list_selected_background</item>
        <item name="messageListReadItemBackgroundColor">#c0cdcdcd</item>
        <item name="messageListUnreadItemBackgroundColor">#00ffffff</item>
        <item name="messageListThreadCountForegroundColor">?android:attr/colorBackground</item>
        <item name="messageListThreadCountBackground">@drawable/thread_count_box_light</item>
        <item name="messageListActiveItemBackgroundColor">#ff2ea7d1</item>
        <item name="messageListPreviewTextColor">#ff696969</item>
        <item name="messageListActiveItemBackgroundColor">@color/color_default_accent</item>
        <item name="messageListPreviewTextColor">@color/color_default_secondary_text</item>
        <item name="messageListDividerColor">@color/color_default_divider</item>
        <item name="messageListStateIconTint">#bbbbbb</item>
        <item name="messageListAttachment">@lineageos.platform:drawable/ic_attachment</item>
@@ -212,13 +212,13 @@
        <item name="iconSettingsImportStatus">@drawable/ic_import_status</item>
        <item name="textColorPrimaryRecipientDropdown">@color/color_default_primary_text</item>
        <item name="textColorSecondaryRecipientDropdown">@color/color_default_secondary_text</item>
        <item name="messageListSelectedBackgroundColor">#8038B8E2</item>
        <item name="messageListSelectedBackgroundColor">@color/color_message_list_selected_background</item>
        <item name="messageListReadItemBackgroundColor">#c0cdcdcd</item>
        <item name="messageListUnreadItemBackgroundColor">#00ffffff</item>
        <item name="messageListThreadCountForegroundColor">?android:attr/colorBackground</item>
        <item name="messageListThreadCountBackground">@drawable/thread_count_box_light</item>
        <item name="messageListActiveItemBackgroundColor">#ff2ea7d1</item>
        <item name="messageListPreviewTextColor">#ff696969</item>
        <item name="messageListActiveItemBackgroundColor">@color/color_default_accent</item>
        <item name="messageListPreviewTextColor">@color/color_default_secondary_text</item>
        <item name="messageListDividerColor">@color/color_default_divider</item>
        <item name="messageListStateIconTint">#bbbbbb</item>
        <item name="messageListAttachment">@lineageos.platform:drawable/ic_attachment</item>
+0 −10
Original line number Diff line number Diff line
@@ -138,16 +138,6 @@ class MessageListAdapter internal constructor(

        val holder = view.tag as MessageViewHolder

        if (appearance.showContactPicture) {
            if (isSelected) {
                holder.contactPicture.isVisible = false
                holder.selected.isVisible = true
            } else {
                holder.selected.isVisible = false
                holder.contactPicture.isVisible = true
            }
        }

        with(message) {
            val maybeBoldTypeface = if (isRead) Typeface.NORMAL else Typeface.BOLD
            val displayDate = relativeDateTimeFormatter.formatDate(messageDate)
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">

    <solid android:color="@android:color/tertiary_text_light"/>
    <solid android:color="@color/color_default_secondary_text"/>
    <!-- A hack because we can't set the color to a theme attribute like ?attr/messageListThreadCountBackgroundColor" -->
    <corners android:radius="4dp"/>