fix(window): allow quick chat to close
这个提交存在于:
父节点
95317d62d8
当前提交
9f61578a73
共有 3 个文件被更改,包括 8 次插入 和 1 次删除
|
|
@ -81,7 +81,8 @@ remote_username 用于远端聊天身份和会话命名,不作为本机权限
|
|||
- 与主窗口共享 `ChatRuntime`、会话选择、消息缓存、未读数和发送队列。
|
||||
- 设置中只提供一个快速聊天目标:`companion` 或 `operations`,二选一。
|
||||
- 设置中提供气泡点击导向:主页面或快速聊天;不增加第三种导向模式。
|
||||
- 处理主窗口关闭到托盘、快速窗口关闭、单实例和窗口重启恢复。
|
||||
- 处理主窗口关闭到托盘、快速窗口关闭、单实例和窗口重启恢复。
|
||||
- 已修复:快捷窗口关闭按钮现在正常销毁窗口;主窗口仍保持关闭到托盘。
|
||||
|
||||
验收:从主窗口和快速窗口发送的消息进入同一会话;任一窗口关闭不影响连接和另一个窗口。
|
||||
|
||||
|
|
|
|||
|
|
@ -163,3 +163,8 @@ Still not claimed complete: automatic startup activation, real Tauri multi-windo
|
|||
|
||||
- Fixed the remaining mojibake in status-bubble state labels and accessibility text.
|
||||
- Validation: TypeScript, ESLint, and Vitest (6 tests) pass.
|
||||
## 2026-07-20: quick-chat close behavior fix
|
||||
|
||||
- Fixed the global close handler so the quick-chat window can be closed normally instead of being intercepted and only hidden.
|
||||
- The main window keeps the existing tray behavior; quick-chat geometry is saved before destruction and restored when reopened.
|
||||
- Validation: Rust Clippy and `astrbot-desktop` unit tests (64) pass.
|
||||
|
|
|
|||
|
|
@ -251,6 +251,7 @@ pub fn run() {
|
|||
WindowEvent::CloseRequested { api, .. } => {
|
||||
if window.label() == QUICK_WINDOW_ID {
|
||||
save_quick_window_state(window, window.app_handle());
|
||||
return;
|
||||
}
|
||||
api.prevent_close();
|
||||
let _ = window.hide();
|
||||
|
|
|
|||
正在加载…
添加表格
在新工单中引用