matterhorn-50200.11.0: Terminal client for the Mattermost chat system

Safe HaskellNone
LanguageHaskell2010

Matterhorn.Draw.Messages

Synopsis

Documentation

nameForUserRef :: ChatState -> UserRef -> Maybe Text Source #

nameForUserRef converts the UserRef into a printable name, based on the current known user data.

renderSingleMessage :: ChatState -> HighlightSet -> Maybe ServerTime -> Message -> ThreadState -> Widget Name Source #

renderSingleMessage is the main message drawing function.

The ind argument specifies an "indicator boundary". Showing various indicators (e.g. "edited") is not typically done for messages that are older than this boundary value.

unsafeRenderMessageSelection :: (Foldable f, Foldable g) => ((Message, ThreadState), (f (Message, ThreadState), g (Message, ThreadState))) -> (Message -> ThreadState -> Widget Name) -> Widget Name Source #

Render a selected message with focus, including the messages before and the messages after it. The foldable parameters exist because (depending on the situation) we might use either of the message list types for the before and after (i.e. the chronological or retrograde message sequences).