@@ -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