diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2026-06-22 22:18:46 +0200 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2026-06-23 21:26:32 +0200 |
| commit | 32d93542af615cd5d7853916623b5c39c54abd1e (patch) | |
| tree | 1dbbf15c13dd3c4a9d53bf55c9f33cd865c6eb1f /src/Erebos/Conversation.hs | |
| parent | 8dfb26e8e115cf04350c5333ce293c3026361adb (diff) | |
Unread message highlighting using status column
Diffstat (limited to 'src/Erebos/Conversation.hs')
| -rw-r--r-- | src/Erebos/Conversation.hs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Erebos/Conversation.hs b/src/Erebos/Conversation.hs index 1c2b340..0e6690e 100644 --- a/src/Erebos/Conversation.hs +++ b/src/Erebos/Conversation.hs @@ -74,12 +74,11 @@ formatMessage :: TimeZone -> Message -> String formatMessage tzone = T.unpack . renderPlainText . formatMessageFT tzone formatMessageFT :: TimeZone -> Message -> FormattedText -formatMessageFT tzone msg = - (if messageUnread msg then FormattedText (CustomTextColor (Just BrightYellow) Nothing) else id) $ mconcat - [ PlainText $ T.pack $ formatTime defaultTimeLocale "[%H:%M] " $ utcToLocalTime tzone $ zonedTimeToUTC $ messageTime msg - , maybe "<unnamed>" PlainText $ idName $ messageFrom msg - , maybe "" ((": " <>) . PlainText) $ messageText msg - ] +formatMessageFT tzone msg = mconcat + [ PlainText $ T.pack $ formatTime defaultTimeLocale "[%H:%M] " $ utcToLocalTime tzone $ zonedTimeToUTC $ messageTime msg + , maybe "<unnamed>" PlainText $ idName $ messageFrom msg + , maybe "" ((": " <>) . PlainText) $ messageText msg + ] data Conversation |