@raydiant/playlist-window-manager 0.28.2-rc5 → 0.29.0

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.
@@ -954,12 +954,12 @@ var PlaylistWindowManager = /** @class */ (function (_super) {
954
954
  switch (_a.label) {
955
955
  case 0:
956
956
  if (!windowToClose) return [3 /*break*/, 2];
957
- // TODO: Do we need to check if the window is already removed/destroyed?
958
- // TODO: Add a guard in BrowserWindowRenderer.removeWindow to check if the window is destroyed?
957
+ // We can't use this.removeCurrentWindow because the currentWindow reference has already
958
+ // changed by the time the timeout fires.
959
959
  return [4 /*yield*/, windowToClose.remove()];
960
960
  case 1:
961
- // TODO: Do we need to check if the window is already removed/destroyed?
962
- // TODO: Add a guard in BrowserWindowRenderer.removeWindow to check if the window is destroyed?
961
+ // We can't use this.removeCurrentWindow because the currentWindow reference has already
962
+ // changed by the time the timeout fires.
963
963
  _a.sent();
964
964
  _a.label = 2;
965
965
  case 2:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raydiant/playlist-window-manager",
3
- "version": "0.28.2-rc5",
3
+ "version": "0.29.0",
4
4
  "description": "Window manager for playlist playback.",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -749,8 +749,6 @@ export default class PlaylistWindowManager extends EventEmitter {
749
749
  this.nextWindow.show(this.isFocused);
750
750
  }
751
751
 
752
- // If current window isn't defined we don't need to hide it but we still
753
- // want to make the next window the new current window.
754
752
  // If current window isn't defined we don't need to hide it but we still
755
753
  // want to make the next window the new current window.
756
754
  let closeWindowPromise;
@@ -764,12 +762,9 @@ export default class PlaylistWindowManager extends EventEmitter {
764
762
  const windowToClose = this.currentWindow;
765
763
  setTimeout(async () => {
766
764
  if (windowToClose) {
767
- // TODO: Do we need to check if the window is already removed/destroyed?
768
- // TODO: Add a guard in BrowserWindowRenderer.removeWindow to check if the window is destroyed?
765
+ // We can't use this.removeCurrentWindow because the currentWindow reference has already
766
+ // changed by the time the timeout fires.
769
767
  await windowToClose.remove();
770
- // TODO: We can't use this.removeCurrentWindow because the currentWindow reference has already
771
- // changed by the time the timeout fires. Is there a better way to handle this?
772
- // await this.removeCurrentWindow();
773
768
  }
774
769
  resolve(undefined);
775
770
  }, this.options.closeWindowDelayMs);