diff --git a/__tests__/__snapshots__/Storyshots.test.js.snap b/__tests__/__snapshots__/Storyshots.test.js.snap index f247b28d..37f8f868 100644 --- a/__tests__/__snapshots__/Storyshots.test.js.snap +++ b/__tests__/__snapshots__/Storyshots.test.js.snap @@ -10480,7 +10480,7 @@ exports[`Storyshots Markdown list Markdown 1`] = ` "textAlign": "left", }, Object { - "color": "#DB0C27", + "color": "#F5455C", }, ] } @@ -10526,7 +10526,7 @@ exports[`Storyshots Markdown list Markdown 1`] = ` "textAlign": "left", }, Object { - "color": "#DFAC00", + "color": "#F3BE08", }, ] } @@ -10571,7 +10571,7 @@ exports[`Storyshots Markdown list Markdown 1`] = ` "textAlign": "left", }, Object { - "color": "#E26D0E", + "color": "#F38C39", }, ] } @@ -10616,7 +10616,7 @@ exports[`Storyshots Markdown list Markdown 1`] = ` "textAlign": "left", }, Object { - "color": "#E26D0E", + "color": "#F38C39", }, ] } @@ -10727,7 +10727,7 @@ exports[`Storyshots Markdown list Markdown 1`] = ` "textAlign": "left", }, Object { - "color": "#DB0C27", + "color": "#F5455C", }, ] } @@ -10773,7 +10773,7 @@ exports[`Storyshots Markdown list Markdown 1`] = ` "textAlign": "left", }, Object { - "color": "#DFAC00", + "color": "#F3BE08", }, ] } @@ -10818,7 +10818,7 @@ exports[`Storyshots Markdown list Markdown 1`] = ` "textAlign": "left", }, Object { - "color": "#E26D0E", + "color": "#F38C39", }, ] } @@ -10863,7 +10863,7 @@ exports[`Storyshots Markdown list Markdown 1`] = ` "textAlign": "left", }, Object { - "color": "#E26D0E", + "color": "#F38C39", }, ] } @@ -10974,7 +10974,7 @@ exports[`Storyshots Markdown list Markdown 1`] = ` "textAlign": "left", }, Object { - "color": "#DFAC00", + "color": "#F3BE08", }, ] } @@ -21634,7 +21634,7 @@ exports[`Storyshots Message list message 1`] = ` "textAlign": "left", }, Object { - "color": "#DFAC00", + "color": "#F3BE08", }, ] } @@ -21681,7 +21681,7 @@ exports[`Storyshots Message list message 1`] = ` "textAlign": "left", }, Object { - "color": "#DB0C27", + "color": "#F5455C", }, ] } @@ -21727,7 +21727,7 @@ exports[`Storyshots Message list message 1`] = ` "textAlign": "left", }, Object { - "color": "#E26D0E", + "color": "#F38C39", }, ] } @@ -21773,7 +21773,7 @@ exports[`Storyshots Message list message 1`] = ` "textAlign": "left", }, Object { - "color": "#E26D0E", + "color": "#F38C39", }, ] } @@ -21820,7 +21820,7 @@ exports[`Storyshots Message list message 1`] = ` "textAlign": "left", }, Object { - "color": "#DFAC00", + "color": "#F3BE08", }, ] } @@ -22050,7 +22050,7 @@ exports[`Storyshots Message list message 1`] = ` "textAlign": "left", }, Object { - "color": "#DFAC00", + "color": "#F3BE08", }, ] } @@ -22097,7 +22097,7 @@ exports[`Storyshots Message list message 1`] = ` "textAlign": "left", }, Object { - "color": "#DB0C27", + "color": "#F5455C", }, ] } @@ -22143,7 +22143,7 @@ exports[`Storyshots Message list message 1`] = ` "textAlign": "left", }, Object { - "color": "#E26D0E", + "color": "#F38C39", }, ] } @@ -22189,7 +22189,7 @@ exports[`Storyshots Message list message 1`] = ` "textAlign": "left", }, Object { - "color": "#E26D0E", + "color": "#F38C39", }, ] } @@ -22236,7 +22236,7 @@ exports[`Storyshots Message list message 1`] = ` "textAlign": "left", }, Object { - "color": "#DFAC00", + "color": "#F3BE08", }, ] } diff --git a/app/constants/colors.js b/app/constants/colors.js index 6a2e33f3..6cc0ea16 100644 --- a/app/constants/colors.js +++ b/app/constants/colors.js @@ -11,13 +11,11 @@ export const SWITCH_TRACK_COLOR = { }; const mentions = { - unreadBackground: '#6C727A', - tunreadBackground: '#1d74f5', - mentionMeColor: '#DB0C27', - mentionMeBackground: '#F5455C', - mentionGroupColor: '#E26D0E', - mentionGroupBackground: '#F38C39', - mentionOtherColor: '#DFAC00' + unreadColor: '#6C727A', + tunreadColor: '#1d74f5', + mentionMeColor: '#F5455C', + mentionGroupColor: '#F38C39', + mentionOtherColor: '#F3BE08' }; export const themes = { diff --git a/app/presentation/UnreadBadge/getUnreadStyle.js b/app/presentation/UnreadBadge/getUnreadStyle.js index ee9af888..0036d64f 100644 --- a/app/presentation/UnreadBadge/getUnreadStyle.js +++ b/app/presentation/UnreadBadge/getUnreadStyle.js @@ -7,14 +7,14 @@ export const getUnreadStyle = ({ return {}; } - let backgroundColor = themes[theme].unreadBackground; + let backgroundColor = themes[theme].unreadColor; const color = themes[theme].buttonText; if (userMentions > 0 || tunreadUser?.length) { - backgroundColor = themes[theme].mentionMeBackground; + backgroundColor = themes[theme].mentionMeColor; } else if (groupMentions > 0 || tunreadGroup?.length) { - backgroundColor = themes[theme].mentionGroupBackground; + backgroundColor = themes[theme].mentionGroupColor; } else if (tunread?.length > 0) { - backgroundColor = themes[theme].tunreadBackground; + backgroundColor = themes[theme].tunreadColor; } return { diff --git a/app/presentation/UnreadBadge/getUnreadStyle.test.js b/app/presentation/UnreadBadge/getUnreadStyle.test.js index 9b35ccb9..a0704b13 100644 --- a/app/presentation/UnreadBadge/getUnreadStyle.test.js +++ b/app/presentation/UnreadBadge/getUnreadStyle.test.js @@ -13,7 +13,7 @@ const testsForTheme = (theme) => { expect(getUnreadStyleUtil({ unread: 1 })).toEqual({ - backgroundColor: themes[theme].unreadBackground, + backgroundColor: themes[theme].unreadColor, color: themes[theme].buttonText }); }); @@ -22,7 +22,7 @@ const testsForTheme = (theme) => { expect(getUnreadStyleUtil({ tunread: [1] })).toEqual({ - backgroundColor: themes[theme].tunreadBackground, + backgroundColor: themes[theme].tunreadColor, color: themes[theme].buttonText }); }); @@ -32,7 +32,7 @@ const testsForTheme = (theme) => { unread: 1, userMentions: 1 })).toEqual({ - backgroundColor: themes[theme].mentionMeBackground, + backgroundColor: themes[theme].mentionMeColor, color: themes[theme].buttonText }); }); @@ -42,7 +42,7 @@ const testsForTheme = (theme) => { unread: 1, groupMentions: 1 })).toEqual({ - backgroundColor: themes[theme].mentionGroupBackground, + backgroundColor: themes[theme].mentionGroupColor, color: themes[theme].buttonText }); }); @@ -54,7 +54,7 @@ const testsForTheme = (theme) => { groupMentions: 1, tunread: [1] })).toEqual({ - backgroundColor: themes[theme].mentionMeBackground, + backgroundColor: themes[theme].mentionMeColor, color: themes[theme].buttonText }); expect(getUnreadStyleUtil({ @@ -62,14 +62,14 @@ const testsForTheme = (theme) => { groupMentions: 1, tunread: [1] })).toEqual({ - backgroundColor: themes[theme].mentionGroupBackground, + backgroundColor: themes[theme].mentionGroupColor, color: themes[theme].buttonText }); expect(getUnreadStyleUtil({ unread: 1, tunread: [1] })).toEqual({ - backgroundColor: themes[theme].tunreadBackground, + backgroundColor: themes[theme].tunreadColor, color: themes[theme].buttonText }); }); diff --git a/app/utils/room.js b/app/utils/room.js index 8a79d4fb..7077c73d 100644 --- a/app/utils/room.js +++ b/app/utils/room.js @@ -34,13 +34,13 @@ export const formatDateThreads = date => moment(date).calendar(null, { export const getBadgeColor = ({ subscription, messageId, theme }) => { if (subscription?.tunreadUser?.includes(messageId)) { - return themes[theme].mentionMeBackground; + return themes[theme].mentionMeColor; } if (subscription?.tunreadGroup?.includes(messageId)) { - return themes[theme].mentionGroupBackground; + return themes[theme].mentionGroupColor; } if (subscription?.tunread?.includes(messageId)) { - return themes[theme].tunreadBackground; + return themes[theme].tunreadColor; } }; diff --git a/app/views/ThreadMessagesView/Item.stories.js b/app/views/ThreadMessagesView/Item.stories.js index 191583a6..be8f398e 100644 --- a/app/views/ThreadMessagesView/Item.stories.js +++ b/app/views/ThreadMessagesView/Item.stories.js @@ -105,21 +105,21 @@ stories.add('content', () => ( stories.add('badge', () => ( <> )); @@ -129,7 +129,7 @@ const ThemeStory = ({ theme }) => ( value={{ theme }} > ); diff --git a/storybook/stories/index.js b/storybook/stories/index.js index d95466c2..693e921b 100644 --- a/storybook/stories/index.js +++ b/storybook/stories/index.js @@ -64,7 +64,7 @@ const messageDecorator = story => ( onReactionPress: () => {}, onDiscussionPress: () => {}, onReactionLongPress: () => {}, - threadBadgeColor: themes.light.tunreadBackground + threadBadgeColor: themes.light.tunreadColor }} > {story()}