Clear notification when sending message on channel

Fixes #74
This commit is contained in:
erroneousboat 2018-01-26 12:58:31 +01:00
parent 97c735f828
commit 43a91fafec

View File

@ -214,10 +214,16 @@ func actionSend(ctx *context.AppContext) {
ctx.View.Input.Clear()
ctx.View.Refresh()
// Send message
ctx.Service.SendMessage(
ctx.View.Channels.SelectedChannel,
message,
)
// Clear notification icon if there is any
ctx.Service.MarkAsRead(ctx.View.Channels.SelectedChannel)
ctx.View.Channels.SetChannels(ctx.Service.ChannelsToString())
termui.Render(ctx.View.Channels)
}
}