diff --git a/main.lua b/main.lua index acdecd7..b615152 100644 --- a/main.lua +++ b/main.lua @@ -267,16 +267,9 @@ function IrcChatView:appendLine(line, target) -- Persist to history self:writeHistory(target, prefix .. line) if target == (self._current_target or "*") then - if self._ui_open and self.scroll_text_w and self.scroll_text_w.text_widget then - self.scroll_text_w.text_widget:setText(buf) - self.scroll_text_w:scrollToBottom() - -- Ensure ScrollTextWidget refreshes its scrollbar & triggers a repaint - if self.scroll_text_w.updateScrollBar then - self.scroll_text_w:updateScrollBar(true) - end - if UIManager and self.frame and self.frame.dimen then - UIManager:setDirty(self, function() return "ui", self.frame.dimen end) - end + if self._ui_open then + -- Reuse the same refresh path as the channel switcher + self:refreshView(target) end else -- increment unread counter for background target