From e8d014d80d976faeb81b451e9f8b878c476bed67 Mon Sep 17 00:00:00 2001 From: Sahil Yeole Date: Thu, 14 Sep 2023 16:31:17 +0530 Subject: [PATCH] feat optional update check Signed-off-by: Sahil Yeole --- src/flutter_ffi.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/flutter_ffi.rs b/src/flutter_ffi.rs index cac47b5ad..dbbe0d707 100644 --- a/src/flutter_ffi.rs +++ b/src/flutter_ffi.rs @@ -1,3 +1,5 @@ +use hbb_common::config::Config; + #[cfg(not(any(target_os = "android", target_os = "ios")))] use crate::common::get_default_sound_input; use crate::{ @@ -1074,7 +1076,9 @@ pub fn main_get_last_remote_id() -> String { } pub fn main_get_software_update_url() -> String { - crate::common::check_software_update(); + if (get_local_option("enable-check-update".to_string()) != "N") { + crate::common::check_software_update(); + } crate::common::SOFTWARE_UPDATE_URL.lock().unwrap().clone() }