irc: avoid reinit on append; set TextViewer.text to current buffer in refresh; rely on switcher refresh path

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2025-09-20 02:48:54 +03:00
parent 8a38e51e20
commit 2f061e20dc

View File

@@ -270,12 +270,6 @@ function IrcChatView:appendLine(line, target)
if self._ui_open then
-- Reuse the same refresh path as the channel switcher
self:refreshView(target)
-- Some platforms require a full widget re-init to repaint reliably
if UIManager and self.reinit then
UIManager:nextTick(function()
if self._ui_open then self:reinit() end
end)
end
end
else
-- increment unread counter for background target
@@ -455,7 +449,9 @@ function IrcChatView:refreshView(target)
if not self._ui_open then return end
self:preloadHistory(target)
if self.scroll_text_w and self.scroll_text_w.text_widget then
self.scroll_text_w.text_widget:setText(self._buffers[target] or "")
local s = self._buffers[target] or ""
self.text = s
self.scroll_text_w.text_widget:setText(s)
self.scroll_text_w:scrollToBottom()
if self.scroll_text_w.updateScrollBar then
self.scroll_text_w:updateScrollBar(true)