feat: refactor to use gpui event instead of local state (#18)

Reviewed-on: #18
Co-authored-by: Ren Amamiya <reya@lume.nu>
Co-committed-by: Ren Amamiya <reya@lume.nu>
This commit was merged in pull request #18.
This commit is contained in:
2026-03-10 08:19:02 +00:00
committed by reya
parent fe4eb7df74
commit 40d726c986
64 changed files with 8341 additions and 1434 deletions

View File

@@ -604,7 +604,10 @@ impl ChatPanel {
Err(e) => {
this.update_in(cx, |this, window, cx| {
this.set_uploading(false, cx);
window.push_notification(Notification::error(e.to_string()), cx);
window.push_notification(
Notification::error(e.to_string()).autohide(false),
cx,
);
})?;
}
}
@@ -652,7 +655,10 @@ impl ChatPanel {
})
.is_err()
{
window.push_notification(Notification::error("Failed to change subject"), cx);
window.push_notification(
Notification::error("Failed to change subject").autohide(false),
cx,
);
}
}
Command::ChangeSigner(kind) => {
@@ -663,7 +669,10 @@ impl ChatPanel {
})
.is_err()
{
window.push_notification(Notification::error("Failed to change signer"), cx);
window.push_notification(
Notification::error("Failed to change signer").autohide(false),
cx,
);
}
}
Command::ToggleBackup => {
@@ -674,7 +683,10 @@ impl ChatPanel {
})
.is_err()
{
window.push_notification(Notification::error("Failed to toggle backup"), cx);
window.push_notification(
Notification::error("Failed to toggle backup").autohide(false),
cx,
);
}
}
Command::Subject => {