hellfire 0.32.2 → 0.32.4

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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [0.32.4](http://10.16.100.57/diffusion/115/paladin/compare/v0.32.3...v0.32.4) (2025-12-19)
6
+
7
+
8
+
9
+ ## [0.32.3](http://10.16.100.57/diffusion/115/paladin/compare/v0.32.2...v0.32.3) (2025-12-17)
10
+
11
+
12
+
5
13
  ## [0.32.2](http://10.16.100.57/diffusion/115/paladin/compare/v0.32.1...v0.32.2) (2025-12-17)
6
14
 
7
15
 
package/dist/index.js CHANGED
@@ -921,15 +921,20 @@ var isDeviceTypeDesktop = function isDeviceTypeDesktop() {
921
921
  var isDeviceTypeMobile = function isDeviceTypeMobile() {
922
922
  if (deviceType === 'mobile') {
923
923
  return true;
924
- } else {
925
- // 手动判断鸿蒙
926
- var ua = navigator.userAgent;
927
- var isHarmony = ua.indexOf('HarmonyOS') > -1 || ua.indexOf('OpenHarmony') > -1 || ua.indexOf('ArkWeb') > -1;
928
- var isMobile = ua.indexOf('Mobile') > -1 || ua.indexOf('Phone') > -1;
924
+ } // 手动判断鸿蒙
929
925
 
930
- if (isHarmony && isMobile) {
931
- return true;
932
- }
926
+
927
+ var ua = navigator.userAgent;
928
+ var isAndroidPhone = /Android/i.test(ua);
929
+ var isHarmony = ua.indexOf('HarmonyOS') > -1 || ua.indexOf('OpenHarmony') > -1 || ua.indexOf('ArkWeb') > -1;
930
+ var isMobile = ua.indexOf('Mobile') > -1 || ua.indexOf('Phone') > -1;
931
+
932
+ if (isHarmony && isMobile) {
933
+ return true;
934
+ }
935
+
936
+ if (isAndroidPhone && isMobile) {
937
+ return true;
933
938
  }
934
939
 
935
940
  return false;
@@ -10329,8 +10334,6 @@ var maxRequest = 4; // 最大并发数 可配置
10329
10334
  var taskTimer;
10330
10335
  var executeCallback;
10331
10336
  var cachedTask = {};
10332
- var errorCache = {}; // 出错的task集合
10333
-
10334
10337
  var currentTopPriority = 1; // 当前最高的优先级(除了及时触发的)
10335
10338
 
10336
10339
  var clearCacheEveryLoad = false; // multi-frame的图像需要每次都清cache 不然一直会报错:frame exceeds size of pixelData
@@ -10352,7 +10355,6 @@ function clear() {
10352
10355
  numRequest = 0;
10353
10356
  maxRequest = 4;
10354
10357
  cachedTask = {};
10355
- errorCache = {};
10356
10358
  executeCallback = null;
10357
10359
  }
10358
10360
 
@@ -10391,18 +10393,9 @@ function addTaskIntoPool(task) {
10391
10393
  var callbacks = cache.callbacks || [];
10392
10394
  callbacks.push(subscribe);
10393
10395
  } else {
10394
- /**
10395
- * 1.首次加载
10396
- * 2.出错过的task重新被触发load
10397
- */
10398
- var errorTask = errorCache[task.key];
10399
-
10400
- var _task = errorTask || task;
10401
-
10402
- if (!errorTask) {
10403
- cachedTask[task.key] = task;
10404
- }
10405
-
10396
+ // 首次加载
10397
+ var _task = task;
10398
+ cachedTask[task.key] = task;
10406
10399
  _task.priority = priority;
10407
10400
  _task.callbacks = [subscribe];
10408
10401
  taskPool.push(_task);
@@ -10500,6 +10493,16 @@ function executeTask() {
10500
10493
  });
10501
10494
  delete cachedTask[task.key];
10502
10495
  executeTask();
10496
+ }).catch(function (err2) {
10497
+ numRequest--;
10498
+ task.callbacks && task.callbacks.map(function (callback) {
10499
+ callback({
10500
+ success: false,
10501
+ err: err2
10502
+ });
10503
+ });
10504
+ delete cachedTask[task.key];
10505
+ executeTask();
10503
10506
  });
10504
10507
  } else {
10505
10508
  numRequest--;
@@ -10509,7 +10512,6 @@ function executeTask() {
10509
10512
  err: err
10510
10513
  });
10511
10514
  });
10512
- errorCache[task.key] = task;
10513
10515
  delete cachedTask[task.key];
10514
10516
  executeTask();
10515
10517
  }