Skip to content

Commit

Permalink
Use a fun lens combinator
Browse files Browse the repository at this point in the history
  • Loading branch information
glguy committed Aug 15, 2024
1 parent 1e130fc commit 9b435a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Client/Message.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import Data.Maybe (isJust)
import Data.Text (Text)
import Data.Text qualified as Text
import Data.Time (ZonedTime)
import Irc.Codes ( pattern RPL_NOWAWAY, pattern RPL_UNAWAY, pattern RPL_MONONLINE, pattern RPL_MONOFFLINE )
import Irc.Codes (pattern RPL_NOWAWAY, pattern RPL_UNAWAY, pattern RPL_MONONLINE, pattern RPL_MONOFFLINE)
import Irc.Identifier (Identifier, mkId)
import Irc.Message (IrcMsg(..), ircMsgText, Source(srcUser))
import Irc.UserInfo (UserInfo(userNick), parseUserInfo, uiNick)
Expand Down
2 changes: 1 addition & 1 deletion src/Client/View/Messages.hs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ chatMessageImages focus w st =
if hideMeta
then detailedImagesWithoutMetadata st
else map (view wlFullImage)
| otherwise = windowLinesToImages st w hideMeta . filter ((/= WLSquelch) . _wlImportance)
| otherwise = windowLinesToImages st w hideMeta . filter (hasn't (wlImportance . only WLSquelch))

detailedImagesWithoutMetadata :: ClientState -> [WindowLine] -> [Image']
detailedImagesWithoutMetadata st wwls =
Expand Down

0 comments on commit 9b435a9

Please sign in to comment.