irc: refresh current channel with same codepath as switcher after append; fixes live updates on send/receive

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2025-09-20 02:39:33 +03:00
parent ef3db25cd0
commit bdb131cbfa

View File

@@ -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