Navigation Menu

Skip to content

Commit

Permalink
Android: Fix auto-entry of server address and port in mainmenu
Browse files Browse the repository at this point in the history
Fixes #2497.
  • Loading branch information
est31 authored and nerzhul committed Mar 16, 2015
1 parent d63df4e commit 16b961b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions builtin/mainmenu/tab_simple_main.lua
Expand Up @@ -98,20 +98,20 @@ local function main_button_handler(tabview, fields, name, tabdata)
end

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.index <= #menudata.favorites then
local address = menudata.favorites[event.index].address
local port = menudata.favorites[event.index].port
if event.row <= #menudata.favorites then
local address = menudata.favorites[event.row].address
local port = menudata.favorites[event.row].port

if address ~= nil and
port ~= nil then
core.setting_set("address",address)
core.setting_set("remote_port",port)
end

tabdata.fav_selected = event.index
tabdata.fav_selected = event.row
end
end
return true
Expand Down

0 comments on commit 16b961b

Please sign in to comment.