Skip to content

Commit

Permalink
Merge pull request #58 from sandeepchhapola/master
Browse files Browse the repository at this point in the history
Fixed app shows nothing after tapping on any RSS Feed, #119524853
  • Loading branch information
DanielHindi authored Aug 23, 2016
2 parents 2eeabdf + 35f7359 commit 7e531c3
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion widget/controllers/widget.media.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@
, audioPlayer = Buildfire.services.media.audioPlayer;
WidgetMedia.loadingVideo = false;

var _data = {
"content": {
"carouselImages": [],
"description": "",
"rssUrl": "http://rss.cnn.com/rss/cnn_topstories.rss"
},
"design": {
"itemListLayout": 'List_Layout_1',
"itemDetailsLayout": 'Feed_Layout_1',
"itemListBgImage": "",
"itemDetailsBgImage": ""
}
};

/**
* WidgetMedia.slider used to show the slider on now-playing page
* @type {*|jQuery|HTMLElement}
Expand Down Expand Up @@ -329,7 +343,11 @@
var init = function () {
var success = function (result) {
$rootScope.showFeed = false;
WidgetMedia.data = result.data;
if (Object.keys(result.data).length > 0)
WidgetMedia.data = result.data;
else
WidgetMedia.data = _data;

if (WidgetMedia.data.design) {
$rootScope.backgroundImage = WidgetMedia.data.design.itemListBgImage;
$rootScope.backgroundImageItem = WidgetMedia.data.design.itemDetailsBgImage;
Expand Down

0 comments on commit 7e531c3

Please sign in to comment.