weather: added showpopup option; closes #352

This commit is contained in:
Luke Bonham 2017-07-25 17:21:36 +02:00
parent 81c816eb8d
commit 721ae4b7b5
2 changed files with 3 additions and 2 deletions

View file

@ -53,6 +53,7 @@ local function factory(args)
end end
local weather_na_markup = args.weather_na_markup or " N/A " local weather_na_markup = args.weather_na_markup or " N/A "
local followtag = args.followtag or false local followtag = args.followtag or false
local showpopup = args.showpopup or "on"
local settings = args.settings or function() end local settings = args.settings or function() end
weather.widget:set_markup(weather_na_markup) weather.widget:set_markup(weather_na_markup)
@ -162,7 +163,7 @@ local function factory(args)
end) end)
end end
weather.attach(weather.widget) if showpopup == "on" then weather.attach(weather.widget) end
weather.timer = helpers.newtimer("weather-" .. city_id, timeout, weather.update, false, true) weather.timer = helpers.newtimer("weather-" .. city_id, timeout, weather.update, false, true)
weather.timer_forecast = helpers.newtimer("weather_forecast-" .. city_id, timeout, weather.forecast_update, false, true) weather.timer_forecast = helpers.newtimer("weather_forecast-" .. city_id, timeout, weather.forecast_update, false, true)

2
wiki

@ -1 +1 @@
Subproject commit 666575233da2ff2f7973320ec69ddf403454b400 Subproject commit bb1a4d45d8ec98109167a53a4ebf2ef9017843c3