irc: show current buffer after (re)init to avoid needing manual switch; preload history on open
Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
7
main.lua
7
main.lua
@@ -88,6 +88,13 @@ function IrcChatView:init(reinit)
|
|||||||
end
|
end
|
||||||
self:updateTitle()
|
self:updateTitle()
|
||||||
TextViewer.init(self, reinit)
|
TextViewer.init(self, reinit)
|
||||||
|
-- Ensure current buffer content is shown immediately after (re)init
|
||||||
|
local tgt = self._current_target or "*"
|
||||||
|
self:preloadHistory(tgt)
|
||||||
|
if self.scroll_text_w and self.scroll_text_w.text_widget then
|
||||||
|
self.scroll_text_w.text_widget:setText(self._buffers[tgt] or "")
|
||||||
|
self.scroll_text_w:scrollToBottom()
|
||||||
|
end
|
||||||
-- Start connection after UI init so we can show logs
|
-- Start connection after UI init so we can show logs
|
||||||
UIManager:nextTick(function() self:startConnection() end)
|
UIManager:nextTick(function() self:startConnection() end)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user