Skip to main content

set_network_state

Function set_network_state 

Source
pub async fn set_network_state(
    app: AppHandle,
    network: NetworkStateWrapperArg,
    db: State<'_, DatabaseWrapper>,
    download_manager: State<'_, DownloadManagerWrapper>,
) -> Result<(), String>
Expand description

Report the device’s current network transport (Android → Rust).

The frontend calls this on startup and whenever the native network callback fires. Updating to an acceptable network re-pumps the download queue, so a queue parked on “waiting for WiFi” drains itself without user action.

TRACES: UR-053 | DR-074