refactor dialogs

This commit is contained in:
2026-09-29 10:46:16 +07:00
parent 828986cd5c
commit 0a9301f131
16 changed files with 202 additions and 200 deletions
+3 -3
View File
@@ -52,7 +52,7 @@ impl Screening {
subscriptions.push(cx.on_release_in(window, move |this, window, cx| {
this.tasks.clear();
window.close_all_modals(cx);
window.close_all_dialogs(cx);
}));
cx.defer_in(window, |this, _window, cx| {
@@ -259,7 +259,7 @@ impl Screening {
self.tasks.push(cx.spawn_in(window, async move |_, cx| {
if task.await.is_ok() {
cx.update(|window, cx| {
window.close_modal(cx);
window.close_dialog(cx);
window.push_notification("Report submitted successfully", cx);
})
.ok();
@@ -270,7 +270,7 @@ impl Screening {
fn mutual_contacts(&mut self, window: &mut Window, cx: &mut Context<Self>) {
let contacts = self.mutual_contacts.clone();
window.open_modal(cx, move |this, _window, _cx| {
window.open_dialog(cx, move |this, _window, _cx| {
let contacts = contacts.clone();
let total = contacts.len();