feat: enhance swipe and back navigation logic
- Adjusted configuration for reset after swipes to 10 seconds and added action to go back. - Updated flow control to skip back action if a recent reset was triggered within 5 seconds. - Implemented a mechanism to enable back navigation when consecutive misses reach a threshold. - Added GUI options to enable or disable back navigation on misses, ensuring consistency with user settings. - Introduced new diagnostic tools for runtime flag checks and screenshot diagnostics. - Created PowerShell scripts for restoring Start Menu shortcuts and performing system health checks. - Added tests for swipe operations and back navigation to validate new logic.
This commit is contained in:
1 parent
0c3a763d63
commit
dcded08796
19 files changed
+936
-22
No files matched your search
@@ -244,6 +244,24 @@ class ConfigManager:
|
||||
if "reset_after_swipes" in config:
|
||||
analyser.reset_after_swipes = int(config["reset_after_swipes"] or 10)
|
||||
|
||||
# 回退方式配置:'swipe'(默认)或 'back'
|
||||
if "reset_after_swipes_action" in config:
|
||||
try:
|
||||
analyser.reset_after_swipes_action = str(
|
||||
config["reset_after_swipes_action"] or "swipe"
|
||||
).lower()
|
||||
except Exception:
|
||||
analyser.reset_after_swipes_action = "swipe"
|
||||
if analyser.reset_after_swipes_action not in ("swipe", "back"):
|
||||
analyser.reset_after_swipes_action = "swipe"
|
||||
|
||||
# 启用/禁用:达到连续未找到福袋阈值时按返回键回退
|
||||
if "enable_back_on_misses" in config:
|
||||
try:
|
||||
analyser.enable_back_on_misses = bool(config["enable_back_on_misses"])
|
||||
except Exception:
|
||||
analyser.enable_back_on_misses = True
|
||||
|
||||
# 新增:下滑达到阈值后按返回并重新进入直播间的配置
|
||||
if "swipe_down_back_enabled" in config:
|
||||
analyser.swipe_down_back_enabled = bool(config["swipe_down_back_enabled"])
|
||||
|
||||
Reference in new issue
Block a user