Switch github_login to String
One of our macros, `impl_actions!`, didn't like that `RemoveContact` had a lifetime.
This commit is contained in:
parent
c18f1b6246
commit
e272a1a18f
1 changed files with 6 additions and 6 deletions
|
@ -141,9 +141,9 @@ impl PartialEq for ContactEntry {
|
||||||
pub struct RequestContact(pub u64);
|
pub struct RequestContact(pub u64);
|
||||||
|
|
||||||
#[derive(Clone, Deserialize, PartialEq)]
|
#[derive(Clone, Deserialize, PartialEq)]
|
||||||
pub struct RemoveContact<'a> {
|
pub struct RemoveContact {
|
||||||
user_id: u64,
|
user_id: u64,
|
||||||
github_login: &'a str,
|
github_login: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Deserialize, PartialEq)]
|
#[derive(Clone, Deserialize, PartialEq)]
|
||||||
|
@ -1074,7 +1074,7 @@ impl ContactList {
|
||||||
let online = contact.online;
|
let online = contact.online;
|
||||||
let busy = contact.busy || calling;
|
let busy = contact.busy || calling;
|
||||||
let user_id = contact.user.id;
|
let user_id = contact.user.id;
|
||||||
let github_login = &contact.user.github_login;
|
let github_login = contact.user.github_login.clone();
|
||||||
let initial_project = project.clone();
|
let initial_project = project.clone();
|
||||||
let mut element =
|
let mut element =
|
||||||
MouseEventHandler::<Contact>::new(contact.user.id as usize, cx, |_, cx| {
|
MouseEventHandler::<Contact>::new(contact.user.id as usize, cx, |_, cx| {
|
||||||
|
@ -1137,7 +1137,7 @@ impl ContactList {
|
||||||
.on_click(MouseButton::Left, move |_, cx| {
|
.on_click(MouseButton::Left, move |_, cx| {
|
||||||
cx.dispatch_action(RemoveContact {
|
cx.dispatch_action(RemoveContact {
|
||||||
user_id,
|
user_id,
|
||||||
github_login,
|
github_login: github_login.clone(),
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.flex_float()
|
.flex_float()
|
||||||
|
@ -1214,7 +1214,7 @@ impl ContactList {
|
||||||
);
|
);
|
||||||
|
|
||||||
let user_id = user.id;
|
let user_id = user.id;
|
||||||
let github_login = &user.github_login;
|
let github_login = user.github_login.clone();
|
||||||
let is_contact_request_pending = user_store.read(cx).is_contact_request_pending(&user);
|
let is_contact_request_pending = user_store.read(cx).is_contact_request_pending(&user);
|
||||||
let button_spacing = theme.contact_button_spacing;
|
let button_spacing = theme.contact_button_spacing;
|
||||||
|
|
||||||
|
@ -1278,7 +1278,7 @@ impl ContactList {
|
||||||
.on_click(MouseButton::Left, move |_, cx| {
|
.on_click(MouseButton::Left, move |_, cx| {
|
||||||
cx.dispatch_action(RemoveContact {
|
cx.dispatch_action(RemoveContact {
|
||||||
user_id,
|
user_id,
|
||||||
github_login,
|
github_login: github_login.clone(),
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.flex_float()
|
.flex_float()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue