mirror of
https://github.com/adoyle0/leptos-use.git
synced 2025-02-08 21:33:09 -05:00
Removed signal warnings from use_websocket
's send...
methods
This commit is contained in:
parent
072a7f12a2
commit
4da91b4427
2 changed files with 6 additions and 2 deletions
|
@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased] -
|
## [Unreleased] -
|
||||||
|
|
||||||
|
### Fix 🍕
|
||||||
|
|
||||||
|
- Removed signal warnings from `use_websocket`'s `send...` methods.
|
||||||
|
|
||||||
### Changes 🔥
|
### Changes 🔥
|
||||||
|
|
||||||
- `use_color_mode` now supports detection from an url query parameter. (thanks to @mondeja)
|
- `use_color_mode` now supports detection from an url query parameter. (thanks to @mondeja)
|
||||||
|
|
|
@ -402,7 +402,7 @@ pub fn use_websocket_with_options(
|
||||||
// Send text (String)
|
// Send text (String)
|
||||||
let send = {
|
let send = {
|
||||||
Box::new(move |data: &str| {
|
Box::new(move |data: &str| {
|
||||||
if ready_state.get() == ConnectionReadyState::Open {
|
if ready_state.get_untracked() == ConnectionReadyState::Open {
|
||||||
if let Some(web_socket) = ws_ref.get_value() {
|
if let Some(web_socket) = ws_ref.get_value() {
|
||||||
let _ = web_socket.send_with_str(data);
|
let _ = web_socket.send_with_str(data);
|
||||||
}
|
}
|
||||||
|
@ -412,7 +412,7 @@ pub fn use_websocket_with_options(
|
||||||
|
|
||||||
// Send bytes
|
// Send bytes
|
||||||
let send_bytes = move |data: Vec<u8>| {
|
let send_bytes = move |data: Vec<u8>| {
|
||||||
if ready_state.get() == ConnectionReadyState::Open {
|
if ready_state.get_untracked() == ConnectionReadyState::Open {
|
||||||
if let Some(web_socket) = ws_ref.get_value() {
|
if let Some(web_socket) = ws_ref.get_value() {
|
||||||
let _ = web_socket.send_with_u8_array(&data);
|
let _ = web_socket.send_with_u8_array(&data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue