@chiyou/minigame-framework 1.4.4 → 1.4.5

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": "@chiyou/minigame-framework",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "基于 Cocos Creator 3.x 的小游戏开发框架,支持多平台发布",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -107,9 +107,11 @@ export abstract class AbsPlatformAdapter extends Component{
107
107
  return this.getWarmStartSceneInfo().category;
108
108
  }
109
109
 
110
- /** 判断是否从指定分类启动(兼容原 isLaunchFromRecentUse/isLaunchFromDesktopShortcut/isLaunchFromAdvertisement) */
110
+ /** 判断是否从指定分类启动(OR逻辑:冷启动或热启动任意匹配即返回true,兼容原 isLaunchFromXxx) */
111
111
  public isLaunchFrom(category: LaunchCategory): boolean {
112
- return this.getLaunchCategory() === category;
112
+ const coldInfo = this.getColdStartSceneInfo();
113
+ const warmInfo = this.getWarmStartSceneInfo();
114
+ return coldInfo.category === category || warmInfo.category === category;
113
115
  }
114
116
 
115
117
  abstract isNavigateToRecentUseAvailable(callback: Function): void;