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:
13
main.lua
13
main.lua
@@ -267,16 +267,9 @@ function IrcChatView:appendLine(line, target)
|
|||||||
-- Persist to history
|
-- Persist to history
|
||||||
self:writeHistory(target, prefix .. line)
|
self:writeHistory(target, prefix .. line)
|
||||||
if target == (self._current_target or "*") then
|
if target == (self._current_target or "*") then
|
||||||
if self._ui_open and self.scroll_text_w and self.scroll_text_w.text_widget then
|
if self._ui_open then
|
||||||
self.scroll_text_w.text_widget:setText(buf)
|
-- Reuse the same refresh path as the channel switcher
|
||||||
self.scroll_text_w:scrollToBottom()
|
self:refreshView(target)
|
||||||
-- 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
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
-- increment unread counter for background target
|
-- increment unread counter for background target
|
||||||
|
|||||||
Reference in New Issue
Block a user