Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Commit

Permalink
Fix bug, where announcement channels wouldn't have a chatheader
Browse files Browse the repository at this point in the history
  • Loading branch information
Bios-Marcel committed Oct 18, 2020
1 parent 601c232 commit 7c46594
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ui/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -2641,14 +2641,12 @@ func (window *Window) UpdateChatHeader(channel *discordgo.Channel) {
return
}

if channel.Type == discordgo.ChannelTypeGuildText {
if channel.GuildID != "" {
if channel.Topic != "" {
window.chatView.SetTitle(channel.Name + " - " + channel.Topic)
} else {
window.chatView.SetTitle(channel.Name)
}
} else if channel.Type == discordgo.ChannelTypeDM {
window.chatView.SetTitle(channel.Recipients[0].Username)
} else {
window.chatView.SetTitle(discordutil.GetPrivateChannelName(channel))
}
Expand Down

0 comments on commit 7c46594

Please sign in to comment.