@exezt-/webamp 1.5.0-0x729 → 1.5.0-0x731

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.
@@ -7459,7 +7459,7 @@ class WinampTelegramCustomHandler {
7459
7459
 
7460
7460
  _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "saveLastPlaylist", playlistLink => {
7461
7461
  this.applicationStorage.setItem("lastlist", playlistLink);
7462
- document.cookie = `lastlist=${playlistLink}; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT; secure`;
7462
+ document.cookie = `lastlist=${playlistLink}; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT; SameSite=None; secure`;
7463
7463
  });
7464
7464
 
7465
7465
  _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getCookie", name => {
@@ -7536,7 +7536,9 @@ class WinampTelegramCustomHandler {
7536
7536
  }
7537
7537
 
7538
7538
  if (typeof localStorage.getItem('app-state') !== "undefined") {
7539
- this.loadOptions(JSON.parse(localStorage.getItem('app-state')));
7539
+ this.applicationStorage.getItem("app-state", v => {
7540
+ this.loadOptions(JSON.parse(v));
7541
+ }); // this.loadOptions(JSON.parse(localStorage.getItem('app-state')!) as SerializedStateV1);
7540
7542
  } else {
7541
7543
  try {
7542
7544
  this.applicationStorage.getItem("app-state", v => {
@@ -7549,9 +7551,9 @@ class WinampTelegramCustomHandler {
7549
7551
 
7550
7552
 
7551
7553
  if (emit !== false) {
7552
- var _this$getCookie, _window2, _window2$Telegram;
7554
+ var _window2, _window2$Telegram;
7553
7555
 
7554
- const lastList = (_this$getCookie = this.getCookie('lastlist')) !== null && _this$getCookie !== void 0 ? _this$getCookie : this.applicationStorage.getItem("lastlist");
7556
+ const lastList = this.applicationStorage.getItem("lastlist"); //this.getCookie('lastlist') ??
7555
7557
 
7556
7558
  if (typeof lastList !== "undefined") {
7557
7559
  this.getTrackListFromYandexDisk(lastList);
@@ -7568,6 +7570,10 @@ class WinampTelegramCustomHandler {
7568
7570
  this.initializeTelegramWebAppEvents();
7569
7571
  }
7570
7572
 
7573
+ this.webamp.__onStateChange(() => {
7574
+ this.updateAppState();
7575
+ });
7576
+
7571
7577
  this.initializeApplicationHandlers();
7572
7578
  }
7573
7579
  }, 1000);
@@ -7604,11 +7610,6 @@ class WinampTelegramCustomHandler {
7604
7610
  open: false
7605
7611
  });
7606
7612
  const ev = ['ended', 'playing', 'timeupdate', 'fileLoaded', 'waiting', 'stopWaiting'];
7607
-
7608
- this.webamp.__onStateChange(() => {
7609
- this.updateAppState();
7610
- });
7611
-
7612
7613
  ev.forEach(ev => this.webamp.media.on(ev, () => {
7613
7614
  this.updateAppState();
7614
7615
  }));