Avoid another confirmation when submitting/discarding feedback (#7569)
Fixes https://github.com/zed-industries/zed/issues/7515 Release Notes: - Fixed feedback modal spawning extra confirmations on cancel and submit ([7515](https://github.com/zed-industries/zed/issues/7515))
This commit is contained in:
parent
d457eef099
commit
f734365b7b
3 changed files with 37 additions and 17 deletions
|
@ -20,7 +20,7 @@ use std::{
|
|||
use theme::{color_alpha, ActiveTheme, ThemeSettings};
|
||||
use ui::{prelude::*, ListItem, ListItemSpacing};
|
||||
use util::ResultExt;
|
||||
use workspace::ModalView;
|
||||
use workspace::{DismissDecision, ModalView};
|
||||
|
||||
actions!(outline, [Toggle]);
|
||||
|
||||
|
@ -55,10 +55,10 @@ impl FocusableView for OutlineView {
|
|||
|
||||
impl EventEmitter<DismissEvent> for OutlineView {}
|
||||
impl ModalView for OutlineView {
|
||||
fn on_before_dismiss(&mut self, cx: &mut ViewContext<Self>) -> bool {
|
||||
fn on_before_dismiss(&mut self, cx: &mut ViewContext<Self>) -> DismissDecision {
|
||||
self.picker
|
||||
.update(cx, |picker, cx| picker.delegate.restore_active_editor(cx));
|
||||
true
|
||||
DismissDecision::Dismiss(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue