about summary refs log tree commit diff
path: root/src/screens/Messages/List/ChatListItem.tsx
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2024-05-17 20:46:01 +0100
committerGitHub <noreply@github.com>2024-05-17 14:46:01 -0500
commitf42f7fa0353a45c6b20e65e1a54b64e1c28b0cd5 (patch)
tree1e1e417dc0985b1d03e6a2a482fafd904539305d /src/screens/Messages/List/ChatListItem.tsx
parentdd0f57e3e3188389bc8ef364e81e4a00405a9a26 (diff)
downloadvoidsky-f42f7fa0353a45c6b20e65e1a54b64e1c28b0cd5.tar.zst
[🐴] don't include blocked convos in unread count (#4082)
* don't include blocked convos in unread count

* Use moderateProfile

* Handle blocked state in chat list

* Fix logic formatting, add todo

---------

Co-authored-by: Eric Bailey <git@esb.lol>
Diffstat (limited to 'src/screens/Messages/List/ChatListItem.tsx')
-rw-r--r--src/screens/Messages/List/ChatListItem.tsx12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/screens/Messages/List/ChatListItem.tsx b/src/screens/Messages/List/ChatListItem.tsx
index 0a0f8c575..a7b7e0680 100644
--- a/src/screens/Messages/List/ChatListItem.tsx
+++ b/src/screens/Messages/List/ChatListItem.tsx
@@ -169,7 +169,7 @@ function ChatListItemReady({
                       )}
                     </TimeElapsed>
                   )}
-                  {convo.muted && (
+                  {(convo.muted || moderation.blocked) && (
                     <Text
                       style={[
                         a.text_sm,
@@ -200,7 +200,8 @@ function ChatListItemReady({
                     convo.unreadCount > 0
                       ? a.font_bold
                       : t.atoms.text_contrast_high,
-                    convo.muted && t.atoms.text_contrast_medium,
+                    (convo.muted || moderation.blocked) &&
+                      t.atoms.text_contrast_medium,
                   ]}>
                   {lastMessage}
                 </Text>
@@ -211,9 +212,10 @@ function ChatListItemReady({
                     a.absolute,
                     a.rounded_full,
                     {
-                      backgroundColor: convo.muted
-                        ? t.palette.contrast_200
-                        : t.palette.primary_500,
+                      backgroundColor:
+                        convo.muted || moderation.blocked
+                          ? t.palette.contrast_200
+                          : t.palette.primary_500,
                       height: 7,
                       width: 7,
                     },