Skip to content

Commit

Permalink
2.0.4 - 修复动态列表展开/排行榜列表数据采集/数据统计默认值联动
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperMonster003 committed Mar 15, 2021
1 parent efb608c commit 257f27c
Show file tree
Hide file tree
Showing 11 changed files with 174 additions and 215 deletions.
35 changes: 11 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,16 @@
******
### 版本历史
******

[comment]: <> (Version history only shows last 3 versions)

# v2.0.4
###### 2021/03/15
* `修复` 好友森林动态列表首次展开后无法继续展开的问题 _[`issue #436`](https://github.com/SuperMonster003/Ant-Forest/issues/436)_
* `修复` 配置工具采集排行榜列表数据时可能会出现假死的问题 _[`issue #443`](https://github.com/SuperMonster003/Ant-Forest/issues/443)_
* `修复` 配置工具数据统计初始化时与日期范围默认值未联动的问题
* `优化` 分离高频读写参数到独立配置文件中降低配置文件损坏概率

# v2.0.3
###### 2021/03/10
* `修复` 切换支付宝语言时的代码逻辑错误及可能出现的管道破裂
Expand All @@ -133,34 +143,11 @@
* `修复` 高版本安卓设备可能无法判断系统应用的问题
* `优化` 增加主账户头像本地样本尺寸检测以防止尺寸越界

# v2.0.1
###### 2021/02/08 - 项目结构变更 谨慎升级
* `提示` 需要留意v2.0.1的项目更新功能可用性
· tools文件夹的项目部署工具 (可用)
· 配置工具的"从服务器还原" (可用)
· 配置工具的"关于"或"Snackbar" (故障)
· 项目运行结果展示时的更新悬浮窗 (故障)
* `提示` 解锁功能配置工具暂时被移除 (将在后续版本恢复)
* `新增` 自动检查更新功能/版本忽略功能及相关配置
* `新增` 排行榜页面的控件滑动策略及相关配置
* `新增` 运行结果展示支持版本更新提示及定时任务信息展示
* `修复` 好友森林动态列表未就绪导致页面判断失效的问题 _[`issue #423`](https://github.com/SuperMonster003/Ant-Forest/issues/423)_ _[`#420`](https://github.com/SuperMonster003/Ant-Forest/issues/420)_ _[`#418`](https://github.com/SuperMonster003/Ant-Forest/issues/418)_ _[`#416`](https://github.com/SuperMonster003/Ant-Forest/issues/416)_
* `修复` 好友森林动态列表未就绪导致能量罩信息获取失败的问题 _[`issue #425`](https://github.com/SuperMonster003/Ant-Forest/issues/425)_
* `修复` 解锁模块覆盖全局require方法后可能导致的功能异常
* `修复` 解锁模块加载外部模块方法的路径匹配错误
* `修复` 找能量向导遮罩导致主页能量球识别失效的问题
* `修复` 执行过程中能量罩倒计时失效后依然触发黑名单的问题
* `修复` 本地备份完成后可能导致本地备份配置信息丢失的问题
* `优化` 移除帮收功能相关的全部功能及配置选项
* `优化` 移除排行榜底部控件图片相关方法以提升兼容性
* `优化` 移除参数调整提示避免自动定时任务无法正常运行的情况
* `优化` 部分imagesx方法提供压缩等级参数以降低OOM出现概率

##### 更多版本历史可参阅
* [CHANGELOG-2.md](https://github.com/SuperMonster003/Ant-Forest/blob/master/documents/CHANGELOG-2.md) ( 2.x 版本 )
* [CHANGELOG-1.md](https://github.com/SuperMonster003/Ant-Forest/blob/master/documents/CHANGELOG-1.md) ( 1.x 版本 )


[//]: # (
[comment]: <> (
If you prefer to make a donation, run ant-forest-settings.js with Auto.js, then go to the "About" page and click my name. When the page with a pink "CLOSE" button popped up, you could see the QR Code by long-clicking this button. Blue QR Code for Alipay and green for WeChat. I believe i could make it better with your support.
)
43 changes: 22 additions & 21 deletions ant-forest-launcher.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Alipay ant forest intelligent collection script launcher
* @since Mar 10, 2021
* @version 2.0.3
* @since Mar 15, 2021
* @version 2.0.4
* @author SuperMonster003
* @see https://github.com/SuperMonster003/Ant-Forest
*/
Expand Down Expand Up @@ -83,6 +83,8 @@ let $$init = {
};
global.$$sto = {
af: require('./modules/mod-storage').create('af'),
af_next: require('./modules/mod-storage').create('af_auto'),
af_ins: require('./modules/mod-storage').create('af_ins'),
af_cfg: require('./modules/mod-storage').create('af_cfg'),
af_blist: require('./modules/mod-storage').create('af_blist'),
af_flist: require('./modules/mod-storage').create('af_flist'),
Expand Down Expand Up @@ -219,7 +221,7 @@ let $$init = {
let _task = task_func.call(null);
let _new_id = _task.id;

$$sto.af.put('next_auto_task', {
$$sto.af_next.put('next_auto_task', {
task_id: _new_id, timestamp: ts, type: type,
});

Expand All @@ -231,7 +233,7 @@ let $$init = {
return _task;
};
$$app.getAutoTask = (def) => {
return $$sto.af.get('next_auto_task', def || {});
return $$sto.af_next.get('next_auto_task', def || {});
};

return this;
Expand Down Expand Up @@ -3124,21 +3126,21 @@ let $$init = {
}
debugInfo('本次会话不再设置保险定时任务');
debugInfo('>任务已达最大连续次数限制: ' + _max);
this.reset();
this.clean().reset();
},
get id() {
if (this.task) {
return this.task.id || -1;
}
},
get _sto_accu() {
return +$$sto.af.get(_keys.ins_accu, 0);
return Number($$sto.af_ins.get(_keys.ins_accu, 0));
},
set _sto_accu(v) {
$$sto.af.put(_keys.ins_accu, +v);
$$sto.af_ins.put(_keys.ins_accu, Number(v));
},
get _sto_ids() {
return $$sto.af.get(_keys.ins_tasks, [])
return $$sto.af_ins.get(_keys.ins_tasks, [])
.filter(id => timersx.getTimedTask(id));
},
get _next_task_time() {
Expand All @@ -3152,11 +3154,10 @@ let $$init = {
_ids.length > 1 ? '[ ' + _ids.join(', ') + ' ]' : _ids[0]
)]);
}
$$sto.af.remove(_keys.ins_tasks);
$$sto.af_ins.remove(_keys.ins_tasks);
return this;
},
reset() {
this.clean();
this._sto_accu = 0;
return this;
},
Expand All @@ -3172,7 +3173,7 @@ let $$init = {
let _id = _this.task.id;
clearInterval(_itv);
let _ids = _this._sto_ids.concat([_id]);
$$sto.af.put(_keys.ins_tasks, _ids);
$$sto.af_ins.put(_keys.ins_tasks, _ids);
debugInfo('已设置意外保险定时任务');
debugInfo('任务ID: ' + _id);
}
Expand Down Expand Up @@ -3242,6 +3243,7 @@ let $$init = {
messageAction('触发按键: 音量减/VOL-', 3, 0, 1);
messageAction(_keyMsg(e), 3, 0, 1, 1);

$$app.monitor.insurance.reset();
engines.myEngine().forceStop();
});
events.setKeyInterceptionEnabled('volume_up', true);
Expand All @@ -3256,6 +3258,7 @@ let $$init = {
messageAction('触发按键: 音量加/VOL+', 4, 0, 1);
messageAction(_keyMsg(e), 4, 0, 1, 1);

$$app.monitor.insurance.reset();
engines.stopAllAndToast();
});
});
Expand Down Expand Up @@ -3695,7 +3698,7 @@ let $$init = {
scrollable: true,
filter(w) {
let bnd = w.bounds();
return bnd.top < cYx(0.1) && bnd.width() > cX(0.96);
return bnd.top < cYx(0.2) && bnd.width() > cX(0.9);
},
});

Expand Down Expand Up @@ -5274,11 +5277,10 @@ let $$af = {

let _ctr = 0;
let _w = null;
let _btn = '点击加载更多';

if (!waitForAction(() => _w = $$sel.pickup(_btn), 3e3)) {
return messageAction('定位"' + _btn + '"按钮超时', 3);
if (!waitForAction(() => _w = $$sel.pickup(/.*加载更多\s*/), 3e3)) {
return debugInfo('定位"加载更多"按钮超时', 3);
}
debugInfo('成功定位"' + $$sel.pickup(_w, 'txt') + '"按钮');

while (_ctr++ < 50) {
waitForAndClickAction(_w, 3e3, 120, {click_strategy: 'w'});
Expand Down Expand Up @@ -6379,7 +6381,7 @@ let $$af = {
$$af.cleaner.imgWrapper();
$$app.blist.save();
$$app.page.rl.pool.clean();
$$app.monitor.insurance.interrupt().reset();
$$app.monitor.insurance.interrupt().clean().reset();
$$app.page.closeIntelligently();
$$app.page.autojs.spring_board.remove();
$$flag.glob_e_scr_privilege = true;
Expand Down Expand Up @@ -6777,9 +6779,8 @@ $$af.launch().collect().timers().epilogue();

/**
* @memorandums
* @on Feb 1, 2021
* @on Feb 12, 2021
* 'Protect' function ('提醒守护功能') went online on around Dec 31, 2020
* At the same time, 'help' function ('帮收功能') was removed (temporarily?)
* Thus, 'help' switch was switched off forcibly for now
* And, all code about 'help' would be removed from this project some day
* At the same time, 'help' function ('帮收功能') was disabled (seems permanently)
* Thus, all code about 'help' has been removed from this project
*/
Loading

0 comments on commit 257f27c

Please sign in to comment.