1module Matterhorn.State.ChannelTopicWindow
2  ( openChannelTopicWindow
3  )
4where
5
6import           Prelude ()
7import           Matterhorn.Prelude
8
9import           Lens.Micro.Platform ( (.=) )
10
11import           Matterhorn.Types
12import           Matterhorn.State.Channels ( getCurrentChannelTopic )
13
14
15openChannelTopicWindow :: MH ()
16openChannelTopicWindow = do
17    t <- getCurrentChannelTopic
18    tId <- use csCurrentTeamId
19    csCurrentTeam.tsChannelTopicDialog .= newChannelTopicDialog tId t
20    setMode ChannelTopicWindow
21