@netless/window-manager 1.0.0-canary.36 → 1.0.0-canary.37

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/window-manager",
3
- "version": "1.0.0-canary.36",
3
+ "version": "1.0.0-canary.37",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
package/src/AppManager.ts CHANGED
@@ -472,16 +472,25 @@ export class AppManager {
472
472
  if (appIds.length === 0) {
473
473
  this.appCreateQueue.emitReady();
474
474
  }
475
- const appsWithCreatedAt = appIds.map(appId => {
475
+ let appsWithCreatedAt = appIds.map(appId => {
476
476
  if (apps[appId].setup) {
477
477
  return {
478
478
  id: appId,
479
479
  createdAt: apps[appId].createdAt,
480
480
  };
481
481
  } else {
482
- return {}
482
+ return {};
483
483
  }
484
484
  });
485
+ // 兼容 1.0 之前版本的回放, 回放时直接过判断 setup 直接创建 app
486
+ if (this.isReplay) {
487
+ appsWithCreatedAt = appIds.map(appId => {
488
+ return {
489
+ id: appId,
490
+ createdAt: apps[appId].createdAt,
491
+ };
492
+ });
493
+ }
485
494
  for (const { id } of orderBy(appsWithCreatedAt, "createdAt", "asc")) {
486
495
  if (id && !this.appProxies.has(id) && !this.appStatus.has(id)) {
487
496
  const app = apps[id];