fix(backup): publish scheduler settings with send_replace (#8386)

`watch::Sender::send` drops the value when there are no receivers at
startup, leaving the scheduler on the default disabled settings.
`send_replace` stores it for the runner that subscribes right after.
This commit is contained in:
nrenvo
2026-11-01 07:43:42 +00:00
committed by GitHub
parent 12f842d038
commit 94942b9105
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -6,6 +6,7 @@
<summary><strong> 🐞 修复问题 </strong></summary>
- 修复规则扩展包含空列表项时,「编辑规则」界面报错的问题
- 修复 重启应用后定时自动备份不执行的问题
- 修复托盘测速与代理页行为不一致的问题,移除托盘「测试延迟」入口
- 修复通过 URL 导入订阅时,即使导入的订阅并非当前使用的订阅,也会重新加载当前配置
- 修复 首页 网站测速失败后卡片一直显示测试中
+2 -2
View File
@@ -109,7 +109,7 @@ impl AutoBackupManager {
{
*self.settings.write() = settings;
}
let _ = self.settings_tx.send(settings);
let _ = self.settings_tx.send_replace(settings);
self.maybe_start_runner(settings);
Ok(())
}
@@ -119,7 +119,7 @@ impl AutoBackupManager {
{
*self.settings.write() = settings;
}
let _ = self.settings_tx.send(settings);
let _ = self.settings_tx.send_replace(settings);
self.maybe_start_runner(settings);
Ok(())
}