Merge branch 'master' into livetvsuggested-to-es6-module-migration

This commit is contained in:
Dmitry Lyzo
2020-08-10 22:21:11 +03:00
committed by GitHub
67 changed files with 3917 additions and 3776 deletions
+24 -26
View File
@@ -1,29 +1,27 @@
define(['tvguide'], function (tvguide) {
'use strict';
import tvguide from 'tvguide';
return function (view, params, tabContent) {
var guideInstance;
var self = this;
export default function (view, params, tabContent) {
let guideInstance;
const self = this;
self.renderTab = function () {
if (!guideInstance) {
guideInstance = new tvguide({
element: tabContent,
serverId: ApiClient.serverId()
});
}
};
self.onShow = function () {
if (guideInstance) {
guideInstance.resume();
}
};
self.onHide = function () {
if (guideInstance) {
guideInstance.pause();
}
};
self.renderTab = function () {
if (!guideInstance) {
guideInstance = new tvguide({
element: tabContent,
serverId: ApiClient.serverId()
});
}
};
});
self.onShow = function () {
if (guideInstance) {
guideInstance.resume();
}
};
self.onHide = function () {
if (guideInstance) {
guideInstance.pause();
}
};
}