Move workspace::toast_layer::RunAction to zed_actions::toast::RunAction (#32222)
Cleaner to have references to this be `toast::RunAction` matching how it appears in the keymap, instead of `workspace::RunAction`. Release Notes: - N/A
This commit is contained in:
parent
96609151c6
commit
5c9b8e8321
6 changed files with 14 additions and 6 deletions
|
@ -3,19 +3,18 @@ use std::{
|
|||
time::{Duration, Instant},
|
||||
};
|
||||
|
||||
use gpui::{AnyView, DismissEvent, Entity, FocusHandle, ManagedView, Subscription, Task, actions};
|
||||
use gpui::{AnyView, DismissEvent, Entity, FocusHandle, ManagedView, Subscription, Task};
|
||||
use ui::{animation::DefaultAnimations, prelude::*};
|
||||
use zed_actions::toast;
|
||||
|
||||
use crate::Workspace;
|
||||
|
||||
const DEFAULT_TOAST_DURATION: Duration = Duration::from_secs(10);
|
||||
const MINIMUM_RESUME_DURATION: Duration = Duration::from_millis(800);
|
||||
|
||||
actions!(toast, [RunAction]);
|
||||
|
||||
pub fn init(cx: &mut App) {
|
||||
cx.observe_new(|workspace: &mut Workspace, _window, _cx| {
|
||||
workspace.register_action(|_workspace, _: &RunAction, window, cx| {
|
||||
workspace.register_action(|_workspace, _: &toast::RunAction, window, cx| {
|
||||
let workspace = cx.entity();
|
||||
let window = window.window_handle();
|
||||
cx.defer(move |cx| {
|
||||
|
|
|
@ -15,7 +15,7 @@ mod toast_layer;
|
|||
mod toolbar;
|
||||
mod workspace_settings;
|
||||
|
||||
pub use toast_layer::{RunAction, ToastAction, ToastLayer, ToastView};
|
||||
pub use toast_layer::{ToastAction, ToastLayer, ToastView};
|
||||
|
||||
use anyhow::{Context as _, Result, anyhow};
|
||||
use call::{ActiveCall, call_settings::CallSettings};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue