Skip to content

Commit 9e6519d

Browse files
committed
v1.3.2-alpha.3,开始打包
1 parent 42c5a30 commit 9e6519d

File tree

2 files changed

+41
-3
lines changed

2 files changed

+41
-3
lines changed

CHANGELOG/v1.3.2-alpha.3/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ v2.0 - Koharu(小鸟游星野) Alpha 3
1616
- 新增 **闪抽功能**,新增快速抽取模式,提升抽奖与点名效率
1717
- 新增 **浮窗可拖动功能**,新增在设置中关闭浮窗可拖动,可防止老师不小心拖动浮窗
1818
- 新增 **启动时显示主窗口功能**,新增在设置中关闭启动时显示主窗口,可在自启动时不显示主窗口
19+
- 新增 **浮窗贴边功能**,新增在设置中开启浮窗贴边,可将浮窗固定在屏幕边缘
1920

2021
## 💡 功能优化
2122

app/view/main/window.py

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,9 @@ def _handle_quick_draw(self):
420420
"animation_interval": readme_settings_async(
421421
"quick_draw_settings", "animation_interval"
422422
),
423+
"autoplay_count": readme_settings_async(
424+
"quick_draw_settings", "autoplay_count"
425+
),
423426
"animation_color_theme": readme_settings_async(
424427
"quick_draw_settings", "animation_color_theme"
425428
),
@@ -431,26 +434,60 @@ def _handle_quick_draw(self):
431434
),
432435
}
433436

434-
# 保存当前的half_repeat设置
437+
# 保存当前的设置
435438
original_half_repeat = readme_settings_async(
436439
"roll_call_settings", "half_repeat"
437440
)
441+
original_animation = readme_settings_async(
442+
"roll_call_settings", "animation"
443+
)
444+
original_animation_interval = readme_settings_async(
445+
"roll_call_settings", "animation_interval"
446+
)
447+
original_autoplay_count = readme_settings_async(
448+
"roll_call_settings", "autoplay_count"
449+
)
438450

439451
try:
440-
# 设置闪抽专用的half_repeat设置
452+
# 设置闪抽专用的设置
441453
update_settings(
442454
"roll_call_settings",
443455
"half_repeat",
444456
quick_draw_settings["half_repeat"],
445457
)
458+
update_settings(
459+
"roll_call_settings",
460+
"animation",
461+
quick_draw_settings["animation"],
462+
)
463+
update_settings(
464+
"roll_call_settings",
465+
"animation_interval",
466+
quick_draw_settings["animation_interval"],
467+
)
468+
# 使用闪抽的自动播放次数设置
469+
update_settings(
470+
"roll_call_settings",
471+
"autoplay_count",
472+
quick_draw_settings["autoplay_count"],
473+
)
446474

447475
# 调用抽取逻辑
448476
roll_call_widget.draw_random()
449477
finally:
450-
# 恢复原始的half_repeat设置
478+
# 恢复原始的设置
451479
update_settings(
452480
"roll_call_settings", "half_repeat", original_half_repeat
453481
)
482+
update_settings("roll_call_settings", "animation", original_animation)
483+
update_settings(
484+
"roll_call_settings",
485+
"animation_interval",
486+
original_animation_interval,
487+
)
488+
update_settings(
489+
"roll_call_settings", "autoplay_count", original_autoplay_count
490+
)
454491

455492
# 处理抽取结果
456493
if hasattr(roll_call_widget, "final_selected_students") and hasattr(

0 commit comments

Comments
 (0)