feat: added tab bar for channels

* change channels field on client to a slice
* moved the command handler to a separate function
This commit is contained in:
2022-01-20 05:08:39 +02:00
parent f097431b8f
commit 2edc007022
6 changed files with 587 additions and 163 deletions
+2
View File
@@ -95,6 +95,8 @@ func (s State) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
s.Client.Initialize(host, port, tlsEnabled)
s.Client.Register(nickname, password, channel)
mainscreen.LastTabIndexInTabBar = len(s.Client.Channels) - 1
// 512 bytes as a base + 8192 additional bytes for tags
r := bufio.NewReaderSize(s.Client.TcpConn, 8192+512)
s.UI.MainScreen.ConnReader = r