1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/scripts/favorites.js

20 lines
479 B
JavaScript
Raw Normal View History

2016-03-31 02:33:37 -04:00
define(['components/favoriteitems'], function (favoriteItems) {
2016-10-23 01:11:46 -04:00
'use strict';
2016-03-16 17:30:49 -04:00
2016-03-31 02:33:37 -04:00
return function (view, params) {
2016-03-16 17:30:49 -04:00
2016-03-31 02:33:37 -04:00
var self = this;
2016-03-16 17:30:49 -04:00
2016-03-31 02:33:37 -04:00
view.addEventListener('viewshow', function (e) {
var isRestored = e.detail.isRestored;
2016-03-16 17:30:49 -04:00
2016-03-31 02:33:37 -04:00
if (!isRestored) {
2016-03-16 17:30:49 -04:00
2016-03-31 02:33:37 -04:00
var parentId = null;
favoriteItems.render(view, Dashboard.getCurrentUserId(), parentId);
2016-03-16 17:30:49 -04:00
}
});
};
});