mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 21:32:40 +00:00
Fix warnings in people_panel
This commit is contained in:
parent
8f578e7521
commit
8b1a2c8cd2
1 changed files with 8 additions and 7 deletions
|
@ -1,17 +1,18 @@
|
|||
use gpui::{
|
||||
elements::*, Element, ElementBox, Entity, ModelHandle, RenderContext, View, ViewContext,
|
||||
};
|
||||
use postage::watch;
|
||||
|
||||
use crate::{
|
||||
theme::Theme,
|
||||
user::{Collaborator, UserStore},
|
||||
Settings,
|
||||
};
|
||||
use gpui::{
|
||||
elements::*, Element, ElementBox, Entity, ModelHandle, RenderContext, Subscription, View,
|
||||
ViewContext,
|
||||
};
|
||||
use postage::watch;
|
||||
|
||||
pub struct PeoplePanel {
|
||||
collaborators: ListState,
|
||||
user_store: ModelHandle<UserStore>,
|
||||
_maintain_collaborators: Subscription,
|
||||
}
|
||||
|
||||
impl PeoplePanel {
|
||||
|
@ -20,7 +21,6 @@ impl PeoplePanel {
|
|||
settings: watch::Receiver<Settings>,
|
||||
cx: &mut ViewContext<Self>,
|
||||
) -> Self {
|
||||
cx.observe(&user_store, Self::update_collaborators);
|
||||
Self {
|
||||
collaborators: ListState::new(
|
||||
user_store.read(cx).collaborators().len(),
|
||||
|
@ -35,6 +35,7 @@ impl PeoplePanel {
|
|||
}
|
||||
},
|
||||
),
|
||||
_maintain_collaborators: cx.observe(&user_store, Self::update_collaborators),
|
||||
user_store,
|
||||
}
|
||||
}
|
||||
|
@ -108,7 +109,7 @@ impl View for PeoplePanel {
|
|||
"PeoplePanel"
|
||||
}
|
||||
|
||||
fn render(&mut self, cx: &mut RenderContext<Self>) -> ElementBox {
|
||||
fn render(&mut self, _: &mut RenderContext<Self>) -> ElementBox {
|
||||
List::new(self.collaborators.clone()).boxed()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue