Skip to content

Commit

Permalink
fix: Use text_id to compare cursor references
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Aug 14, 2023
1 parent 6b8ae0f commit 3bae45f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hooks/src/use_camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ use std::{
time::Duration,
};

use crate::use_platform;
use dioxus_core::{AttributeValue, ScopeState};
use dioxus_hooks::{to_owned, use_effect, use_state, UseState};
use freya_common::EventMessage;
use freya_node_state::{CustomAttributeValues, ImageReference};
use nokhwa::{pixel_format::RgbFormat, utils::RequestedFormat, Camera, NokhwaError};
use tokio::time::sleep;
use crate::use_platform;

pub use nokhwa::utils::{CameraIndex, RequestedFormatType, Resolution};

Expand Down
2 changes: 1 addition & 1 deletion hooks/src/use_node.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use dioxus_core::{AttributeValue, ScopeState};
use dioxus_hooks::{use_ref, use_state, UseRef, to_owned};
use dioxus_hooks::{to_owned, use_ref, use_state, UseRef};
use freya_common::NodeReferenceLayout;
use freya_node_state::{CustomAttributeValues, NodeReference};
use tokio::sync::mpsc::unbounded_channel;
Expand Down
4 changes: 2 additions & 2 deletions state/src/custom_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ impl CursorReference {
}

impl PartialEq for CursorReference {
fn eq(&self, _: &Self) -> bool {
true
fn eq(&self, other: &Self) -> bool {
self.text_id == other.text_id
}
}

Expand Down

0 comments on commit 3bae45f

Please sign in to comment.