BlueGit

ict rusty-teams

Files

rusty-teams / crates / app / src / views / shell.rs

shell.rs

shell.rs 26.0 KiB Download Raw
1use gpui_kit::component::{h_flex, v_flex};
2use gpui_kit::*;
3
4use super::activity_panel::{ActivityPanel, ActivityPanelEvent};
5use super::call_mini::render_call_mini;
6use super::call_stage::render_stage_overlay;
7use super::call_view::render_call_view;
8use super::conversation::{ConversationView, ReplyToHovered};
9use super::dialog_overlay::render_task_dialog;
10use super::forward_dialog::{ForwardDialog, ForwardDialogEvent};
11use super::image_viewer::{ImageViewer, ImageViewerEvent};
12use super::profile_card::{ProfileCard, ProfileCardEvent};
13use super::rail::RailView;
14use super::saved_panel::{SavedPanel, SavedPanelEvent};
15use super::shortcuts::{
16 AcceptCall, DeclineCall, HangUpCall, NextConversation, OpenActivity, OpenChannelsTab,
17 OpenCallsTab, OpenChatsTab, OpenSaved, PreviousConversation, Scope, ShowShortcuts, ToggleCallCamera,
18 ToggleCallShare,
19};
20use super::shortcuts_dialog::{ShortcutsDialog, ShortcutsDialogEvent};
21use super::sidebar::{SIDEBAR_WIDTH, SidebarView};
22use super::status_bar::render_status_bar;
23use super::status_menu::own_status_button;
24use super::status_message_dialog::{StatusMessageDialog, StatusMessageDialogEvent};
25use super::switcher::{Switcher, SwitcherEvent, candidates_from};
26use super::title_bar::render_title_bar;
27use crate::activity::ActivityCenter;
28use crate::app_state::{AppEvent, AppState, Selection};
29use crate::call::{CallMedia, CallWindows};
30use crate::embedded_web::{Overlays, RootFocus};
31use crate::notice::NoticeAction;
32use crate::notify::{NotificationCenter, selection_for};
33use crate::sidebar_model::Step;
34use crate::theme;
35use crate::updater::{self, IdleInputs, UpdateStatus};
36
37actions!(teams, [OpenSwitcher, NewChat, ToggleCallMute]);
38
39pub fn bind_keys(cx: &mut App) {
40 super::composer::bind_keys(cx);
41 super::shortcuts::bind_scopes(cx, &[Scope::Global, Scope::OutsideComposer, Scope::GlobalOverTextFields]);
42}
43
44#[derive(Debug, Clone, Copy)]
45pub enum OpenTarget {
46 Chat(usize),
47 Channel(usize),
48}
49
50#[derive(Default)]
51pub struct Startup {
52 pub switcher_query: Option<String>,
53 pub composer_text: Option<String>,
54 pub reply_to_last: bool,
55}
56
57pub const ISLAND_GAP: f32 = 6.;
58
59pub struct AppShell {
60 state: Entity<AppState>,
61 rail: Entity<RailView>,
62 sidebar: Entity<SidebarView>,
63 conversation: Entity<ConversationView>,
64 call_chat: Option<(String, Entity<ConversationView>)>,
65 switcher: Option<Entity<Switcher>>,
66 notifications: Entity<NotificationCenter>,
67 _call_windows: Entity<CallWindows>,
68 forward_dialog: Option<Entity<ForwardDialog>>,
69 image_viewer: Option<Entity<ImageViewer>>,
70 status_dialog: Option<Entity<StatusMessageDialog>>,
71 shortcuts_dialog: Option<Entity<ShortcutsDialog>>,
72 profile_card: Option<Entity<ProfileCard>>,
73 focus_handle: FocusHandle,
74 open_target: Option<OpenTarget>,
75 update: UpdateStatus,
76 _subscription: Subscription,
77 _call_media_observation: Subscription,
78 _panel_subscriptions: [Subscription; 2],
79 _escape_observation: Subscription,
80 _activation_observation: Subscription,
81}
82
83impl AppShell {
84 fn sync_call_chat(&mut self, thread: Option<String>, window: &mut Window, cx: &mut Context<Self>) {
85 match (thread, &self.call_chat) {
86 (Some(wanted), Some((open, _))) if &wanted == open => {}
87 (Some(wanted), _) => {
88 let app = self.state.clone();
89 let selection = Selection::Chat(wanted.clone());
90 let view = cx.new(|cx| ConversationView::pinned_to(app, selection, window, cx));
91 self.call_chat = Some((wanted, view));
92 }
93 (None, _) => self.call_chat = None,
94 }
95 }
96
97 pub fn new(
98 state: Entity<AppState>,
99 open_target: Option<OpenTarget>,
100 startup: Startup,
101 window: &mut Window,
102 cx: &mut Context<Self>,
103 ) -> Self {
104 let call_media = cx.new(|_| CallMedia);
105 state.update(cx, |state, _| state.call_media = Some(call_media.clone()));
106 let call_media_observation = cx.observe(&call_media, |_, _, cx| cx.notify());
107 let activity = cx.new(|cx| ActivityCenter::new(state.clone(), window, cx));
108 let activity_panel = cx.new(|cx| ActivityPanel::new(state.clone(), activity.clone(), cx));
109 let saved_panel = cx.new(|cx| SavedPanel::new(state.clone(), cx));
110 let panel_subscriptions = [
111 cx.subscribe(&activity_panel, |this, _, event: &ActivityPanelEvent, cx| match event {
112 ActivityPanelEvent::OpenSettings => this
113 .notifications
114 .update(cx, |center, cx| center.open_settings(cx)),
115 ActivityPanelEvent::Open {
116 conversation_id,
117 message_id,
118 } => this.open_message(conversation_id, message_id, cx),
119 }),
120 cx.subscribe(&saved_panel, |this, _, event: &SavedPanelEvent, cx| {
121 let SavedPanelEvent::Open {
122 conversation_id,
123 message_id,
124 } = event;
125 this.open_message(conversation_id, message_id, cx);
126 }),
127 ];
128 let sidebar = cx.new(|cx| SidebarView::new(state.clone(), activity_panel, saved_panel, cx));
129 let rail = cx.new(|cx| RailView::new(state.clone(), activity.clone(), sidebar.clone(), cx));
130 let conversation = cx.new(|cx| ConversationView::new(state.clone(), window, cx));
131 let subscription =
132 cx.subscribe_in(&state, window, |this, _, event: &AppEvent, window, cx| {
133 if matches!(event, AppEvent::Sidebar | AppEvent::Status) {
134 this.apply_open_target(cx);
135 }
136 if matches!(event, AppEvent::Forward) {
137 this.open_forward_dialog(window, cx);
138 }
139 if matches!(event, AppEvent::ImageViewer) {
140 this.open_image_viewer(window, cx);
141 }
142 if matches!(event, AppEvent::StatusMessage) {
143 this.open_status_dialog(window, cx);
144 }
145 if matches!(event, AppEvent::NotificationSettings) {
146 this.notifications
147 .update(cx, |center, cx| center.open_settings(cx));
148 }
149 if matches!(event, AppEvent::Profile) {
150 this.open_profile_card(window, cx);
151 }
152 cx.notify();
153 });
154 let focus_handle = cx.focus_handle();
155 window.focus(&focus_handle, cx);
156 cx.set_global(RootFocus(focus_handle.clone()));
157 let notifications = cx.new(|cx| NotificationCenter::new(state.clone(), window, cx));
158 let call_windows = cx.new(|cx| CallWindows::new(state.clone(), window, cx));
159 let escape_observation = cx.observe_keystrokes(|this, event, _, cx| {
160 if event.keystroke.key == "escape" {
161 this.state.update(cx, |state, cx| state.leave_stage_fullscreen(cx));
162 }
163 });
164 let activation_observation = cx.observe_window_activation(window, |this, window, cx| {
165 if window.is_window_active() {
166 this.state.update(cx, |state, cx| state.refresh_calendar(cx));
167 }
168 });
169 let closing = notifications.clone();
170 window.on_window_should_close(cx, move |_, cx| !closing.read(cx).intercept_close(cx));
171 let mut shell = AppShell {
172 state,
173 rail,
174 sidebar,
175 conversation,
176 call_chat: None,
177 switcher: None,
178 notifications,
179 _call_windows: call_windows,
180 forward_dialog: None,
181 image_viewer: None,
182 status_dialog: None,
183 shortcuts_dialog: None,
184 profile_card: None,
185 focus_handle,
186 open_target,
187 update: UpdateStatus::UpToDate,
188 _subscription: subscription,
189 _call_media_observation: call_media_observation,
190 _panel_subscriptions: panel_subscriptions,
191 _escape_observation: escape_observation,
192 _activation_observation: activation_observation,
193 };
194 shell.apply_open_target(cx);
195 let Startup {
196 switcher_query,
197 composer_text,
198 reply_to_last,
199 } = startup;
200 if let Some(query) = switcher_query {
201 shell.toggle_switcher(&query, window, cx);
202 }
203 if composer_text.is_some() || reply_to_last {
204 cx.defer_in(window, move |this, window, cx| {
205 this.conversation.update(cx, |conversation, cx| {
206 if reply_to_last {
207 conversation.reply_to_latest_from_others(window, cx);
208 }
209 if let Some(text) = composer_text {
210 conversation.set_composer_text(&text, window, cx);
211 }
212 });
213 });
214 }
215 #[cfg(windows)]
216 cx.spawn_in(window, async move |this, cx| {
217 loop {
218 cx.background_executor().timer(updater::POLL_INTERVAL).await;
219 if this
220 .update_in(cx, |this, window, cx| this.poll_update(window, cx))
221 .is_err()
222 {
223 break;
224 }
225 }
226 })
227 .detach();
228 shell
229 }
230
231 #[cfg_attr(not(windows), allow(dead_code))]
232 fn poll_update(&mut self, window: &mut Window, cx: &mut Context<Self>) {
233 if matches!(self.update, UpdateStatus::Failed(_) | UpdateStatus::Installing) {
234 return;
235 }
236 let Some(paths) = updater::current_paths() else {
237 return;
238 };
239 if self.update == UpdateStatus::UpToDate {
240 if !updater::check(&paths) {
241 return;
242 }
243 self.update = UpdateStatus::Ready;
244 let update_exe = paths.update_exe.clone();
245 cx.background_spawn(async move { updater::prescan(&update_exe) })
246 .detach();
247 }
248 let conversation = self.conversation.read(cx);
249 let idle = updater::is_idle(IdleInputs {
250 window_active: window.is_window_active(),
251 composer_empty: conversation.composer_is_empty(cx),
252 send_in_flight: conversation.send_in_flight(),
253 });
254 if idle {
255 self.restart_into_update(cx);
256 }
257 cx.notify();
258 }
259
260 fn restart_into_update(&mut self, cx: &mut Context<Self>) {
261 if self.update == UpdateStatus::Installing {
262 return;
263 }
264 let Some(paths) = updater::current_paths() else {
265 return;
266 };
267 self.update = UpdateStatus::Installing;
268 cx.notify();
269 cx.spawn(async move |this, cx| {
270 let result = cx
271 .background_spawn(async move { updater::install_and_relaunch(&paths) })
272 .await;
273 let _ = this.update(cx, |this, cx| {
274 match result {
275 Ok(()) => cx.quit(),
276 Err(message) => this.update = UpdateStatus::Failed(message),
277 }
278 cx.notify();
279 });
280 })
281 .detach();
282 }
283
284 fn apply_open_target(&mut self, cx: &mut Context<Self>) {
285 let Some(target) = self.open_target else {
286 return;
287 };
288 let sidebar = &self.state.read(cx).sidebar;
289 let selection = match target {
290 OpenTarget::Chat(index) => sidebar
291 .chats
292 .get(index)
293 .map(|chat| Selection::Chat(chat.id.clone())),
294 OpenTarget::Channel(index) => sidebar
295 .teams
296 .iter()
297 .flat_map(|team| team.channels.iter())
298 .nth(index)
299 .map(|channel| Selection::Channel(channel.id.clone())),
300 };
301 if let Some(selection) = selection {
302 self.open_target = None;
303 self.state
304 .update(cx, |state, cx| state.select(selection, cx));
305 }
306 }
307
308 fn toggle_switcher(
309 &mut self,
310 initial_query: &str,
311 window: &mut Window,
312 cx: &mut Context<Self>,
313 ) {
314 if self.switcher.take().is_some() {
315 window.focus(&self.focus_handle, cx);
316 cx.notify();
317 return;
318 }
319 let candidates = candidates_from(self.state.read(cx));
320 let app = self.state.clone();
321 let switcher = cx.new(|cx| Switcher::new(app, candidates, initial_query, window, cx));
322 cx.subscribe_in(
323 &switcher,
324 window,
325 |this, _, event: &SwitcherEvent, window, cx| {
326 match event {
327 SwitcherEvent::Pick(selection) => {
328 let selection = selection.clone();
329 this.state
330 .update(cx, |state, cx| state.select(selection, cx));
331 }
332 SwitcherEvent::PickMessage {
333 selection,
334 message_id,
335 } => {
336 let (selection, message_id) = (selection.clone(), message_id.clone());
337 this.state.update(cx, |state, cx| {
338 state.jump_to_message(selection, message_id, cx)
339 });
340 }
341 SwitcherEvent::Close => {}
342 }
343 this.switcher = None;
344 window.focus(&this.focus_handle, cx);
345 cx.notify();
346 },
347 )
348 .detach();
349 self.switcher = Some(switcher);
350 cx.notify();
351 }
352
353 fn open_message(&mut self, conversation_id: &str, message_id: &str, cx: &mut Context<Self>) {
354 let Some(selection) = selection_for(&self.state.read(cx).sidebar, conversation_id) else {
355 return;
356 };
357 let message_id = message_id.to_owned();
358 self.state.update(cx, |state, cx| {
359 if message_id.is_empty() {
360 state.select(selection, cx)
361 } else {
362 state.jump_to_message(selection, message_id, cx)
363 }
364 });
365 }
366
367 fn open_status_dialog(&mut self, window: &mut Window, cx: &mut Context<Self>) {
368 if !self
369 .state
370 .update(cx, |state, _| state.take_status_message_request())
371 {
372 return;
373 }
374 self.switcher = None;
375 let app = self.state.clone();
376 let dialog = cx.new(|cx| StatusMessageDialog::new(app, window, cx));
377 cx.subscribe_in(
378 &dialog,
379 window,
380 |this, _, _: &StatusMessageDialogEvent, window, cx| {
381 this.status_dialog = None;
382 window.focus(&this.focus_handle, cx);
383 cx.notify();
384 },
385 )
386 .detach();
387 self.status_dialog = Some(dialog);
388 cx.notify();
389 }
390
391 fn toggle_shortcuts_dialog(&mut self, window: &mut Window, cx: &mut Context<Self>) {
392 if self.shortcuts_dialog.take().is_some() {
393 window.focus(&self.focus_handle, cx);
394 cx.notify();
395 return;
396 }
397 self.switcher = None;
398 let dialog = cx.new(|cx| ShortcutsDialog::new(window, cx));
399 cx.subscribe_in(
400 &dialog,
401 window,
402 |this, _, _: &ShortcutsDialogEvent, window, cx| {
403 this.shortcuts_dialog = None;
404 window.focus(&this.focus_handle, cx);
405 cx.notify();
406 },
407 )
408 .detach();
409 self.shortcuts_dialog = Some(dialog);
410 cx.notify();
411 }
412
413 fn open_profile_card(&mut self, window: &mut Window, cx: &mut Context<Self>) {
414 let Some(request) = self
415 .state
416 .update(cx, |state, _| state.take_profile_request())
417 else {
418 return;
419 };
420 if let Some(card) = &self.profile_card {
421 card.update(cx, |card, cx| {
422 card.move_to(request.user_id, request.anchor, cx)
423 });
424 return;
425 }
426 let app = self.state.clone();
427 let card = cx.new(|cx| ProfileCard::new(app, request.user_id, request.anchor, window, cx));
428 cx.subscribe_in(
429 &card,
430 window,
431 |this, _, _: &ProfileCardEvent, window, cx| {
432 this.profile_card = None;
433 window.focus(&this.focus_handle, cx);
434 cx.notify();
435 },
436 )
437 .detach();
438 self.profile_card = Some(card);
439 cx.notify();
440 }
441
442 fn open_image_viewer(&mut self, window: &mut Window, cx: &mut Context<Self>) {
443 let Some(request) = self
444 .state
445 .update(cx, |state, _| state.take_image_viewer_request())
446 else {
447 return;
448 };
449 self.switcher = None;
450 let app = self.state.clone();
451 let viewer = cx.new(|cx| ImageViewer::new(app, request, window, cx));
452 cx.subscribe_in(
453 &viewer,
454 window,
455 |this, _, _: &ImageViewerEvent, window, cx| {
456 this.image_viewer = None;
457 window.focus(&this.focus_handle, cx);
458 cx.notify();
459 },
460 )
461 .detach();
462 self.image_viewer = Some(viewer);
463 cx.notify();
464 }
465
466 fn restore_focus(&self, window: &mut Window, cx: &mut Context<Self>) {
467 match &self.image_viewer {
468 Some(viewer) => {
469 let handle = viewer.read(cx).focus_handle();
470 window.focus(&handle, cx)
471 }
472 None => window.focus(&self.focus_handle, cx),
473 }
474 }
475
476 fn open_forward_dialog(&mut self, window: &mut Window, cx: &mut Context<Self>) {
477 let Some(source) = self
478 .state
479 .update(cx, |state, _| state.take_forward_request())
480 else {
481 return;
482 };
483 self.switcher = None;
484 let candidates = candidates_from(self.state.read(cx));
485 let app = self.state.clone();
486 let dialog = cx.new(|cx| ForwardDialog::new(app, source, candidates, window, cx));
487 cx.subscribe_in(
488 &dialog,
489 window,
490 |this, _, event: &ForwardDialogEvent, window, cx| {
491 this.forward_dialog = None;
492 this.restore_focus(window, cx);
493 if let ForwardDialogEvent::Sent { target, title } = event {
494 let target = target.clone();
495 let open = NoticeAction::new("Open", move |state, cx| {
496 state.select(target.clone(), cx)
497 });
498 this.state.update(cx, |state, cx| {
499 state.raise_notice(format!("Forwarded to {title}"), Some(open), cx)
500 });
501 }
502 cx.notify();
503 },
504 )
505 .detach();
506 self.forward_dialog = Some(dialog);
507 cx.notify();
508 }
509}
510
511impl AppShell {
512 fn islands(&self, call_view: Option<AnyElement>) -> impl IntoElement {
513 h_flex()
514 .flex_1()
515 .min_h_0()
516 .w_full()
517 .gap(px(ISLAND_GAP))
518 .pr(px(ISLAND_GAP))
519 .py(px(ISLAND_GAP))
520 .child(
521 h_flex()
522 .h_full()
523 .flex_none()
524 .child(self.rail.clone())
525 .child(
526 self.sidebar
527 .clone()
528 .cached(StyleRefinement::default().w(px(SIDEBAR_WIDTH)).h_full().flex_none()),
529 ),
530 )
531 .child(match call_view {
532 Some(call_view) => call_view,
533 None => self
534 .conversation
535 .clone()
536 .cached(
537 StyleRefinement::default()
538 .flex_1()
539 .min_w_0()
540 .h_full()
541 .rounded(px(10.))
542 .bg(theme::surface())
543 .overflow_hidden(),
544 )
545 .into_any_element(),
546 })
547 }
548}
549
550impl Render for AppShell {
551 fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
552 if let Some(dialog) = self
553 .state
554 .read(cx)
555 .task_dialog
556 .as_ref()
557 .map(|dialog| (dialog.scope.clone(), dialog.card.clone()))
558 {
559 self.state.update(cx, |state, cx| {
560 state.ensure_card_inputs(&dialog.0, &dialog.1, window, cx)
561 });
562 }
563 if let Some(me) = self.state.read(cx).directory.me.clone() {
564 let app = self.state.clone();
565 cx.defer(move |cx| {
566 app.update(cx, |state, cx| {
567 state.request_avatars(vec![me.user_id.clone()], cx);
568 state.request_presence(vec![me.user_id], cx);
569 });
570 });
571 }
572 let panels = self.switcher.is_some()
573 || self.forward_dialog.is_some()
574 || self.image_viewer.is_some()
575 || self.status_dialog.is_some()
576 || self.shortcuts_dialog.is_some()
577 || self.profile_card.is_some()
578 || {
579 let state = self.state.read(cx);
580 state.task_dialog.is_some() || state.status_menu_open
581 };
582 Overlays::update(cx, |overlays| overlays.panels = panels);
583 let chat_thread = self.state.read(cx).call_chat_thread();
584 self.sync_call_chat(chat_thread, window, cx);
585 let chat_panel = self.call_chat.as_ref().map(|(_, view)| view.clone());
586 let state = self.state.read(cx);
587 let call_view = render_call_view(&self.state, state, chat_panel).filter(|_| state.viewing_call());
588 let call_mini = render_call_mini(&self.state, state);
589 let stage_overlay = render_stage_overlay(&self.state, state);
590 let status = render_status_bar(
591 state,
592 &self.update,
593 cx.listener(|this, _, _, cx| this.restart_into_update(cx)),
594 cx.listener(|this, _, _, cx| {
595 this.state
596 .update(cx, |state, cx| state.run_notice_action(cx))
597 }),
598 );
599 let title_bar = render_title_bar(
600 own_status_button(&self.state, state),
601 cx.listener(|this, _, window, cx| this.toggle_switcher("", window, cx)),
602 );
603 div()
604 .id("app-shell")
605 .key_context("AppShell")
606 .track_focus(&self.focus_handle)
607 .on_action(cx.listener(|this, _: &OpenSwitcher, window, cx| {
608 this.toggle_switcher("", window, cx);
609 }))
610 .on_action(cx.listener(|this, _: &NewChat, _, cx| {
611 this.state.update(cx, |state, cx| state.start_new_chat(cx));
612 }))
613 .on_action(cx.listener(|this, _: &ToggleCallMute, _, cx| {
614 this.state.update(cx, |state, cx| state.toggle_call_mute(cx));
615 }))
616 .on_action(cx.listener(|this, _: &ShowShortcuts, window, cx| {
617 this.toggle_shortcuts_dialog(window, cx);
618 }))
619 .on_action(cx.listener(|this, _: &OpenActivity, _, cx| {
620 this.sidebar.update(cx, |sidebar, cx| sidebar.show_activity(cx));
621 }))
622 .on_action(cx.listener(|this, _: &OpenSaved, _, cx| {
623 this.sidebar.update(cx, |sidebar, cx| sidebar.show_saved(cx));
624 }))
625 .on_action(cx.listener(|this, _: &OpenChatsTab, _, cx| {
626 this.sidebar.update(cx, |sidebar, cx| sidebar.show_chats(cx));
627 }))
628 .on_action(cx.listener(|this, _: &OpenChannelsTab, _, cx| {
629 this.sidebar.update(cx, |sidebar, cx| sidebar.show_channels(cx));
630 }))
631 .on_action(cx.listener(|this, _: &OpenCallsTab, _, cx| {
632 this.sidebar.update(cx, |sidebar, cx| sidebar.show_calls(cx));
633 }))
634 .on_action(cx.listener(|this, _: &PreviousConversation, _, cx| {
635 this.sidebar
636 .update(cx, |sidebar, cx| sidebar.select_adjacent(Step::Previous, cx));
637 }))
638 .on_action(cx.listener(|this, _: &NextConversation, _, cx| {
639 this.sidebar
640 .update(cx, |sidebar, cx| sidebar.select_adjacent(Step::Next, cx));
641 }))
642 .on_action(cx.listener(|this, _: &AcceptCall, _, cx| {
643 this.state.update(cx, |state, cx| state.accept_ringing_call(cx));
644 }))
645 .on_action(cx.listener(|this, _: &DeclineCall, _, cx| {
646 this.state.update(cx, |state, cx| state.decline_ringing_call(cx));
647 }))
648 .on_action(cx.listener(|this, _: &HangUpCall, _, cx| {
649 this.state.update(cx, |state, cx| state.leave_call(cx));
650 }))
651 .on_action(cx.listener(|this, _: &ToggleCallCamera, _, cx| {
652 this.state.update(cx, |state, cx| state.toggle_call_camera(cx));
653 }))
654 .on_action(cx.listener(|this, _: &ToggleCallShare, _, cx| {
655 this.state.update(cx, |state, cx| state.toggle_call_share(cx));
656 }))
657 .on_action(cx.listener(|this, _: &ReplyToHovered, window, cx| {
658 this.conversation.update(cx, |conversation, cx| {
659 conversation.reply_to_hovered(window, cx)
660 });
661 }))
662 .relative()
663 .size_full()
664 .bg(theme::background())
665 .text_color(theme::text())
666 .text_size(px(14.))
667 .child(crate::frame_log::probe("first"))
668 .child(
669 v_flex()
670 .size_full()
671 .child(title_bar)
672 .child(self.islands(call_view))
673 .child(status),
674 )
675 .children(call_mini)
676 .children(stage_overlay)
677 .children(self.image_viewer.clone())
678 .children(self.switcher.clone())
679 .children(render_task_dialog(self.state.read(cx), cx))
680 .children(self.forward_dialog.clone())
681 .children(self.status_dialog.clone())
682 .children(self.shortcuts_dialog.clone())
683 .children(self.profile_card.clone())
684 .child(crate::frame_log::probe("last"))
685 }
686}