parent
78b6ecbcec
commit
88b9bc32ff
@ -527,8 +527,19 @@ func actionChangeChannel(ctx *context.AppContext) {
|
|||||||
ctx.View.Channels.MarkAsRead(ctx.View.Channels.SelectedChannel)
|
ctx.View.Channels.MarkAsRead(ctx.View.Channels.SelectedChannel)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redraw grid, necessary when threads and/or debug is set
|
// Redraw grid, necessary when threads and/or debug is set. We will redraw
|
||||||
actionRedrawGrid(ctx, haveThreads, ctx.Debug)
|
// the grid when there are threads, or we just came from a thread and went
|
||||||
|
// to a channel without threads. Hence the clearing of ChannelItems of
|
||||||
|
// Threads.
|
||||||
|
if haveThreads {
|
||||||
|
actionRedrawGrid(ctx, haveThreads, ctx.Debug)
|
||||||
|
} else if !haveThreads && len(ctx.View.Threads.ChannelItems) > 0 {
|
||||||
|
ctx.View.Threads.SetChannels([]components.ChannelItem{})
|
||||||
|
actionRedrawGrid(ctx, haveThreads, ctx.Debug)
|
||||||
|
} else {
|
||||||
|
termui.Render(ctx.View.Channels)
|
||||||
|
termui.Render(ctx.View.Chat)
|
||||||
|
}
|
||||||
|
|
||||||
// Set focus, necessary to know when replying to thread or chat
|
// Set focus, necessary to know when replying to thread or chat
|
||||||
ctx.Focus = context.ChatFocus
|
ctx.Focus = context.ChatFocus
|
||||||
|
Loading…
Reference in New Issue
Block a user