Rename app_state to global in gpui

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-03-17 14:33:01 +01:00
parent 84bacc556f
commit 44d997c00c
24 changed files with 91 additions and 89 deletions

View file

@ -55,7 +55,7 @@ impl ContactsPanel {
app_state: Arc<AppState>,
cx: &mut LayoutContext,
) -> ElementBox {
let theme = cx.app_state::<Settings>().theme.clone();
let theme = cx.global::<Settings>().theme.clone();
let theme = &theme.contacts_panel;
let project_count = collaborator.projects.len();
let font_cache = cx.font_cache();
@ -236,7 +236,7 @@ impl View for ContactsPanel {
}
fn render(&mut self, cx: &mut RenderContext<Self>) -> ElementBox {
let theme = &cx.app_state::<Settings>().theme.contacts_panel;
let theme = &cx.global::<Settings>().theme.contacts_panel;
Container::new(List::new(self.contacts.clone()).boxed())
.with_style(theme.container)
.boxed()