()
| 736 | } |
| 737 | |
| 738 | func (m *ircModel) refreshChat() { |
| 739 | if m.activeID == 0 { |
| 740 | return |
| 741 | } |
| 742 | s := m.servers[m.activeID] |
| 743 | if s == nil { |
| 744 | return |
| 745 | } |
| 746 | var logs []string |
| 747 | if s.channelLogs != nil { |
| 748 | logs = s.channelLogs[m.activeChan] |
| 749 | } |
| 750 | var b strings.Builder |
| 751 | w := m.chatVP.Width |
| 752 | if w <= 0 { |
| 753 | w = 80 |
| 754 | } |
| 755 | for _, ln := range logs { |
| 756 | b.WriteString(wordwrap.String(ln, w) + "\n") |
| 757 | } |
| 758 | m.chatVP.SetContent(b.String()) |
| 759 | m.chatVP.GotoBottom() |
| 760 | } |
| 761 | |
| 762 | /* SLASH CMDS */ |
| 763 |
no outgoing calls
no test coverage detected