matterhorn-90000.0.0: Terminal client for the Mattermost chat system
Safe HaskellSafe-Inferred
LanguageHaskell2010

Matterhorn.State.Teams

Synopsis

Documentation

nextTeam :: MH () Source #

Move right in the channel list to select the next team.

prevTeam :: MH () Source #

Move left in the channel list to select the previous team.

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.

setTeam :: TeamId -> MH () Source #

Set the current team directly

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.