irc: fix gettext shadowing by avoiding '_' loop variables (Switch channel, receive loop)

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2025-09-20 01:48:15 +03:00
parent 19b456f583
commit f6d82336ca

View File

@@ -299,7 +299,7 @@ function IrcChatView:receiveLoop()
if self._closing then return end
if not self._sock then return end
-- Non-blocking receive lines; iterate until no more data
for _ = 1, 50 do -- cap per tick
for i = 1, 50 do -- cap per tick
local line, err, partial = self._sock:receive("*l")
if line then
self:handleLine(line)
@@ -493,7 +493,7 @@ function IrcChatView:showChannelSwitcher()
local Menu = require("ui/widget/menu")
local items = {}
local targets = self._ordered_targets or {}
for _, tgt in ipairs(targets) do
for i, tgt in ipairs(targets) do
local label = (tgt == "*" and _("Server console")) or tgt
table.insert(items, {
text_func = function()
@@ -894,7 +894,7 @@ function IRC:connectToServer(server)
if server.channels and #server.channels > 1 then
-- Prompt to pick a channel
local buttons = {}
for _, ch in ipairs(server.channels) do
for i, ch in ipairs(server.channels) do
table.insert(buttons, { { text = ch, callback = function() UIManager:close(self._chan_dlg); open_chat(ch) end } })
end
self._chan_dlg = require("ui/widget/buttondialog"):new{