Skip to content
Snippets Groups Projects
Commit 16b961b2 authored by est31's avatar est31 Committed by Loic Blot
Browse files

Android: Fix auto-entry of server address and port in mainmenu

Fixes #2497.
parent d63df4ec
No related branches found
No related tags found
No related merge requests found
...@@ -98,12 +98,12 @@ local function main_button_handler(tabview, fields, name, tabdata) ...@@ -98,12 +98,12 @@ local function main_button_handler(tabview, fields, name, tabdata)
end end
if fields["favourites"] ~= nil then if fields["favourites"] ~= nil then
local event = core.explode_textlist_event(fields["favourites"]) local event = core.explode_table_event(fields["favourites"])
if event.type == "CHG" then if event.type == "CHG" then
if event.index <= #menudata.favorites then if event.row <= #menudata.favorites then
local address = menudata.favorites[event.index].address local address = menudata.favorites[event.row].address
local port = menudata.favorites[event.index].port local port = menudata.favorites[event.row].port
if address ~= nil and if address ~= nil and
port ~= nil then port ~= nil then
...@@ -111,7 +111,7 @@ local function main_button_handler(tabview, fields, name, tabdata) ...@@ -111,7 +111,7 @@ local function main_button_handler(tabview, fields, name, tabdata)
core.setting_set("remote_port",port) core.setting_set("remote_port",port)
end end
tabdata.fav_selected = event.index tabdata.fav_selected = event.row
end end
end end
return true return true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment