Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- nextTeam :: MH ()
- prevTeam :: MH ()
- handleJoinTeam :: TeamId -> MH ()
- handleLeaveTeam :: TeamId -> MH ()
- handleUpdateTeam :: TeamId -> MH ()
- buildTeamState :: ChatResources -> User -> Team -> IO (TeamState, ClientChannels)
- moveCurrentTeamLeft :: MH ()
- moveCurrentTeamRight :: MH ()
- setTeam :: TeamId -> MH ()
- newSaveAttachmentDialog :: Name -> Text -> SaveAttachmentDialogState Name
- newChannelTopicDialog :: TeamId -> Text -> ChannelTopicDialogState
- newThreadInterface :: Maybe Aspell -> BChan MHEvent -> TeamId -> ChannelId -> Message -> Post -> Messages -> IO ThreadInterface
- makeClientChannel :: MonadIO m => BChan MHEvent -> Maybe Aspell -> UserId -> Maybe TeamId -> Channel -> ChannelMember -> m ClientChannel
- cycleTeamMessageInterfaceFocus :: TeamId -> MH ()
Documentation
handleJoinTeam :: TeamId -> MH () Source #
Fetch the specified team and add it to the application state.
This is called in response to a server event indicating that the current user was added to the team.
handleLeaveTeam :: TeamId -> MH () Source #
Remove the specified team to the application state.
This is called in response to a server event indicating that the current user was removed from the team.
handleUpdateTeam :: TeamId -> MH () Source #
Fetch the specified team's metadata and update it in the application state.
This is called in response to a server event indicating that the specified team was updated in some way.
buildTeamState :: ChatResources -> User -> Team -> IO (TeamState, ClientChannels) Source #
Build a new TeamState
for the specified team.
This function starts a new spell checker thread for the team's message editor, loads the last-run state for the team (to ensure that the initially-selected channel is honored), and fetches the channel metadata for the team.
This returns the resulting team state as well as the channels associated with the team. The caller is responsible for adding the channels and the team state to the application state.
moveCurrentTeamLeft :: MH () Source #
Move the selected team left in the team list.
moveCurrentTeamRight :: MH () Source #
Move the selected team right in the team list.
newSaveAttachmentDialog :: Name -> Text -> SaveAttachmentDialogState Name Source #
Make a new attachment-saving editor window state.
newChannelTopicDialog :: TeamId -> Text -> ChannelTopicDialogState Source #
Make a new channel topic editor window state.
newThreadInterface :: Maybe Aspell -> BChan MHEvent -> TeamId -> ChannelId -> Message -> Post -> Messages -> IO ThreadInterface Source #
makeClientChannel :: MonadIO m => BChan MHEvent -> Maybe Aspell -> UserId -> Maybe TeamId -> Channel -> ChannelMember -> m ClientChannel Source #
cycleTeamMessageInterfaceFocus :: TeamId -> MH () Source #