If a home favorite loses it's associated favorite (it gets deleted), open the config dialog so user can pick another instead of always being blank.

This commit is contained in:
Nathan Gray
2015-05-04 15:26:18 +00:00
parent 9e3676a8c9
commit f1983a3f07
3 changed files with 23 additions and 8 deletions

View File

@ -873,6 +873,16 @@ app.classes.home.home_weather_portlet = app.classes.home.home_portlet.extend({
}
});
app.classes.home.home_favorite_portlet = app.classes.home.home_portlet.extend({
init: function(portlet) {
// call parent
this._super.apply(this, arguments);
// Somehow favorite got lost, or is not set
if(!portlet.options.settings.favorite)
{
portlet.edit_settings();
}
},
observer: function(_msg, _app, _id, _type, _msg_type, _targetapp)
{
if(this.portlet.class.indexOf(_app) == 0 || this.portlet.class == 'home_favorite_portlet')