@exezt-/webamp 1.5.0-0x601 → 1.5.0-0x603
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10084,6 +10084,8 @@ function selectAll() {
|
|
|
10084
10084
|
|
|
10085
10085
|
class webamp_telegram_handler_WinampTelegramCustomHandler {
|
|
10086
10086
|
constructor() {
|
|
10087
|
+
var _window, _window$Telegram, _window2, _window2$Telegram;
|
|
10088
|
+
|
|
10087
10089
|
defineProperty_default()(this, "webamp", void 0);
|
|
10088
10090
|
|
|
10089
10091
|
defineProperty_default()(this, "telegram", void 0);
|
|
@@ -10245,18 +10247,13 @@ class webamp_telegram_handler_WinampTelegramCustomHandler {
|
|
|
10245
10247
|
}
|
|
10246
10248
|
});
|
|
10247
10249
|
|
|
10248
|
-
const lastList = this.getCookie('lastlist');
|
|
10250
|
+
const lastList = this.getCookie('lastlist'); // @ts-ignore | because no global var telegram avail in project types
|
|
10251
|
+
|
|
10252
|
+
this.telegram = (_window = window) === null || _window === void 0 ? void 0 : (_window$Telegram = _window.Telegram) === null || _window$Telegram === void 0 ? void 0 : _window$Telegram.WebApp;
|
|
10249
10253
|
|
|
10250
10254
|
if (typeof lastList !== "undefined") {
|
|
10251
10255
|
this.getFiles(lastList);
|
|
10252
10256
|
}
|
|
10253
|
-
}
|
|
10254
|
-
|
|
10255
|
-
initialize() {
|
|
10256
|
-
var _window, _window$Telegram, _window2, _window2$Telegram;
|
|
10257
|
-
|
|
10258
|
-
// @ts-ignore | because no global var telegram avail in project types
|
|
10259
|
-
this.telegram = (_window = window) === null || _window === void 0 ? void 0 : (_window$Telegram = _window.Telegram) === null || _window$Telegram === void 0 ? void 0 : _window$Telegram.WebApp;
|
|
10260
10257
|
|
|
10261
10258
|
if (!window.__webamp) {
|
|
10262
10259
|
throw new Error("Webamp __webamp is undefined!!");
|
|
@@ -10267,7 +10264,9 @@ class webamp_telegram_handler_WinampTelegramCustomHandler {
|
|
|
10267
10264
|
console.error("Telegram is undefined!! Skipping Telegram.WebApp event handler...");
|
|
10268
10265
|
}
|
|
10269
10266
|
|
|
10270
|
-
if (typeof localStorage.getItem('app-state') !== "undefined")
|
|
10267
|
+
if (typeof localStorage.getItem('app-state') !== "undefined") {
|
|
10268
|
+
this.loadOptions(JSON.parse(localStorage.getItem('app-state')));
|
|
10269
|
+
}
|
|
10271
10270
|
|
|
10272
10271
|
window.__webamp.onTrackDidChange(() => {
|
|
10273
10272
|
this.updateAppState();
|