Add space order controls
This commit is contained in:
@@ -1,9 +1,26 @@
|
||||
use ely_domain::SpaceId;
|
||||
use gpui::{Context, Window};
|
||||
|
||||
use super::{ElyShell, ShellState};
|
||||
use crate::{SelectNextSpace, SelectPreviousSpace};
|
||||
|
||||
impl ElyShell {
|
||||
pub(super) fn move_space_up(&mut self, space_id: &SpaceId, cx: &mut Context<Self>) {
|
||||
if let ShellState::Ready(core) = &mut self.state
|
||||
&& core.move_space_up(space_id).is_ok_and(|moved| moved)
|
||||
{
|
||||
cx.notify();
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn move_space_down(&mut self, space_id: &SpaceId, cx: &mut Context<Self>) {
|
||||
if let ShellState::Ready(core) = &mut self.state
|
||||
&& core.move_space_down(space_id).is_ok_and(|moved| moved)
|
||||
{
|
||||
cx.notify();
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn on_select_next_space(
|
||||
&mut self,
|
||||
_: &SelectNextSpace,
|
||||
|
||||
Reference in New Issue
Block a user