Finish fixing up Avatar using URI
This commit is contained in:
parent
44d40625fe
commit
fd6320b136
6 changed files with 10 additions and 48 deletions
|
@ -19,6 +19,7 @@ mod contact_finder;
|
|||
use contact_finder::ContactFinder;
|
||||
use menu::{Cancel, Confirm, SelectNext, SelectPrev};
|
||||
use rpc::proto::{self, PeerId};
|
||||
use smallvec::SmallVec;
|
||||
use theme::{ActiveTheme, ThemeSettings};
|
||||
// use context_menu::{ContextMenu, ContextMenuItem};
|
||||
// use db::kvp::KEY_VALUE_STORE;
|
||||
|
@ -2543,7 +2544,7 @@ impl CollabPanel {
|
|||
} else {
|
||||
None
|
||||
})
|
||||
.collect::<Vec<_>>(),
|
||||
.collect::<SmallVec<_>>(),
|
||||
};
|
||||
|
||||
Some(result)
|
||||
|
|
|
@ -221,7 +221,7 @@ impl NotificationPanel {
|
|||
|
||||
Some(
|
||||
h_stack()
|
||||
.children(actor.map(|actor| Avatar::from(actor.avatar.clone())))
|
||||
.children(actor.map(|actor| Avatar::new(actor.avatar_uri.clone())))
|
||||
.child(
|
||||
v_stack().child(Label::new(text)).child(
|
||||
h_stack()
|
||||
|
@ -675,7 +675,7 @@ impl Render for NotificationToast {
|
|||
|
||||
h_stack()
|
||||
.id("notification_panel_toast")
|
||||
.children(user.and_then(|user| Some(img(user.avatar.clone()?))))
|
||||
.children(user.map(|user| Avatar::new(user.avatar_uri.clone())))
|
||||
.child(Label::new(self.text.clone()))
|
||||
.child(
|
||||
IconButton::new("close", Icon::Close)
|
||||
|
|
|
@ -114,14 +114,7 @@ impl IncomingCallNotification {
|
|||
}
|
||||
fn render_caller(&self, cx: &mut ViewContext<Self>) -> impl Element {
|
||||
h_stack()
|
||||
.children(
|
||||
self.state
|
||||
.call
|
||||
.calling_user
|
||||
.avatar
|
||||
.as_ref()
|
||||
.map(|avatar| Avatar::data(avatar.clone())),
|
||||
)
|
||||
.child(Avatar::new(self.state.call.calling_user.avatar_uri.clone()))
|
||||
.child(
|
||||
v_stack()
|
||||
.child(Label::new(format!(
|
||||
|
|
|
@ -119,12 +119,7 @@ impl ProjectSharedNotification {
|
|||
|
||||
fn render_owner(&self) -> impl Element {
|
||||
h_stack()
|
||||
.children(
|
||||
self.owner
|
||||
.avatar
|
||||
.clone()
|
||||
.map(|avatar| Avatar::data(avatar.clone())),
|
||||
)
|
||||
.child(Avatar::new(self.owner.avatar_uri.clone()))
|
||||
.child(
|
||||
v_stack()
|
||||
.child(Label::new(self.owner.github_login.clone()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue