Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(friends): Fix did hash for outgoing/incoming being reversed #1250

Merged
merged 10 commits into from
Oct 9, 2023
3 changes: 2 additions & 1 deletion ui/src/components/friends/incoming_requests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ pub fn PendingFriends(cx: Scope) -> Element {
let _status_message = friend.status_message().unwrap_or_default();
let did = friend.did_key();
let did2 = did.clone();
let did_suffix: String = did.to_string().chars().rev().take(6).collect();
let mut did_suffix: String = did.to_string();
did_suffix = did_suffix.char_indices().nth_back(6).map(|(i,_)|did_suffix[i..].to_string()).unwrap_or_default();
Flemmli97 marked this conversation as resolved.
Show resolved Hide resolved
let platform = friend.platform().into();
let friend2 = friend.clone();
let friend3 = friend.clone();
Expand Down
3 changes: 2 additions & 1 deletion ui/src/components/friends/outgoing_requests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ pub fn OutgoingRequests(cx: Scope) -> Element {
friends_list.into_iter().map(|friend| {
let did = friend.did_key();
let did2 = did.clone();
let did_suffix: String = did.to_string().chars().rev().take(6).collect();
let mut did_suffix: String = did.to_string();
did_suffix = did_suffix.char_indices().nth_back(6).map(|(i,_)|did_suffix[i..].to_string()).unwrap_or_default();
Flemmli97 marked this conversation as resolved.
Show resolved Hide resolved
let platform = friend.platform().into();
let any_button_disabled = remove_in_progress.current().contains(&did);
rsx!(
Expand Down