mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-08-31 20:35:05 +00:00
13 lines
448 B
Rust
13 lines
448 B
Rust
![]() |
use crate::{entities::NetworkState, services::ws::WsManager};
|
||
|
use bytes::Bytes;
|
||
|
use flowy_error::FlowyError;
|
||
|
use lib_dispatch::prelude::{Data, Unit};
|
||
|
use std::sync::Arc;
|
||
|
|
||
|
#[tracing::instrument(skip(data, ws_manager))]
|
||
|
pub async fn update_network_ty(data: Data<NetworkState>, ws_manager: Unit<Arc<WsManager>>) -> Result<(), FlowyError> {
|
||
|
let network_state = data.into_inner();
|
||
|
ws_manager.update_network_type(&network_state.ty);
|
||
|
Ok(())
|
||
|
}
|