|
56 | 56 | var isUnchanged=false; |
57 | 57 | if(cache.items && result.items && result.items.length){ |
58 | 58 | result.items = result.items.filter(item => ( |
59 | | - item.snippet && |
60 | | - item.snippet.thumbnails && |
| 59 | + item.snippet && |
| 60 | + item.snippet.thumbnails && |
61 | 61 | Object.keys(item.snippet.thumbnails).length)); |
62 | 62 |
|
63 | 63 | if(cache.items.length == result.items.length){ |
|
76 | 76 | WidgetFeed.videos = []; |
77 | 77 | WidgetFeed.busy = false; |
78 | 78 | WidgetFeed.nextPageToken = null; |
79 | | - setTimeout(() => { |
| 79 | + setTimeout(() => { |
80 | 80 | if(!$rootScope.loading){ |
81 | 81 | getFeedVideosSuccess(result); |
82 | 82 | } |
|
94 | 94 | VIDEO_COUNT.LIMIT, |
95 | 95 | null |
96 | 96 | ).then(compareDataFromCacheAndYouTube, errorWithComperation); |
97 | | - } |
| 97 | + } |
98 | 98 | }; |
99 | 99 | /* |
100 | 100 | * Fetch user's data from datastore |
|
283 | 283 | // double check that result is not null |
284 | 284 | if (result && result.items && result.items.length) { |
285 | 285 | result.items = result.items.filter(item => ( |
286 | | - item.snippet && |
287 | | - item.snippet.thumbnails && |
| 286 | + item.snippet && |
| 287 | + item.snippet.thumbnails && |
288 | 288 | Object.keys(item.snippet.thumbnails).length)); |
289 | 289 |
|
290 | 290 | $rootScope.showEmptyState = false; |
|
488 | 488 | WidgetFeed.openDetailsPage = function(video, pushToHistory = true) { |
489 | 489 | if (WidgetFeed.screenAnimationInProgress) return; |
490 | 490 | WidgetFeed.screenAnimationInProgress = true; |
491 | | - |
| 491 | + |
492 | 492 | if (video.snippet && video.snippet.resourceId && video.snippet.resourceId.videoId) { |
493 | 493 | video.id = video.snippet.resourceId.videoId; |
494 | 494 | } |
495 | | - VideoCache.setCache({...video, pushToHistory}); |
| 495 | + VideoCache.setCache({...video, pushToHistory}); |
496 | 496 | }; |
497 | 497 | $scope.$watch('$root.currentVideo', function() { |
498 | 498 | const video = $rootScope.currentVideo; |
|
562 | 562 | }; |
563 | 563 |
|
564 | 564 | $rootScope.$on("ROUTE_CHANGED", function(e, data) { |
565 | | - WidgetFeed.data = data; |
566 | | - |
567 | 565 | WidgetFeed.updateAuthListeners(); |
568 | 566 |
|
569 | 567 | if (WidgetFeed.data && !WidgetFeed.data.design) { |
|
0 commit comments