Skip to content

Commit d8496ab

Browse files
committed
refactor is_custom_client
1 parent 280c129 commit d8496ab

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/common.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,9 +1721,17 @@ pub fn get_builtin_option(key: &str) -> String {
17211721
.unwrap_or_default()
17221722
}
17231723

1724+
#[inline]
1725+
pub fn is_custom_client() -> bool {
1726+
get_app_name() != "RustDesk"
1727+
}
1728+
17241729
pub fn verify_login(raw: &str, id: &str) -> bool {
17251730
true
17261731
/*
1732+
if is_custom_client() {
1733+
return true;
1734+
}
17271735
#[cfg(debug_assertions)]
17281736
return true;
17291737
let Ok(pk) = crate::decode64("IycjQd4TmWvjjLnYd796Rd+XkK+KG+7GU1Ia7u4+vSw=") else {

src/flutter_ffi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,7 @@ pub fn is_outgoing_only() -> SyncReturn<bool> {
20152015
}
20162016

20172017
pub fn is_custom_client() -> SyncReturn<bool> {
2018-
SyncReturn(get_app_name() != "RustDesk")
2018+
SyncReturn(crate::common::is_custom_client())
20192019
}
20202020

20212021
pub fn is_disable_settings() -> SyncReturn<bool> {

0 commit comments

Comments
 (0)