irc: update titlebar when switching channels
Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
9
main.lua
9
main.lua
@@ -74,10 +74,15 @@ end
|
|||||||
|
|
||||||
function IrcChatView:updateTitle()
|
function IrcChatView:updateTitle()
|
||||||
local tgt = self._current_target
|
local tgt = self._current_target
|
||||||
|
local new_title
|
||||||
if tgt and tgt ~= "*" then
|
if tgt and tgt ~= "*" then
|
||||||
self.title = tgt
|
new_title = tgt
|
||||||
else
|
else
|
||||||
self.title = self._server_label
|
new_title = self._server_label
|
||||||
|
end
|
||||||
|
self.title = new_title
|
||||||
|
if self.titlebar and self.titlebar.setTitle then
|
||||||
|
self.titlebar:setTitle(new_title)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user