del finished TODOs

This commit is contained in:
csf 2022-09-13 22:37:16 +08:00
parent 2e2bf3b8fb
commit 583ccb4b66
5 changed files with 3 additions and 17 deletions

@ -365,7 +365,7 @@ pub mod connection_manager {
log::debug!("call_service_set_by_name fail,{}", e);
}
// send to UI, refresh widget
self.push_event("add_connection", vec![("client", &client_json)]); // TODO use add_connection
self.push_event("add_connection", vec![("client", &client_json)]);
}
fn remove_connection(&self, id: i32) {

@ -575,7 +575,6 @@ pub fn main_forget_password(id: String) {
forget_password(id)
}
// TODO APP_DIR & ui_interface
pub fn main_get_recent_peers() -> String {
if !config::APP_DIR.read().unwrap().is_empty() {
let peers: Vec<(String, config::PeerInfoSerde)> = PeerConfig::peers()
@ -709,9 +708,6 @@ pub fn session_new_rdp(id: String) {
}
pub fn main_get_last_remote_id() -> String {
// if !config::APP_DIR.read().unwrap().is_empty() {
// res = LocalConfig::get_remote_id();
// }
LocalConfig::get_remote_id()
}

@ -411,7 +411,6 @@ impl sciter::EventHandler for SciterSession {
impl SciterSession {
pub fn new(cmd: String, id: String, password: String, args: Vec<String>) -> Self {
let session: Session<SciterHandler> = Session {
cmd: cmd.clone(),
id: id.clone(),
password: password.clone(),
args,

@ -139,10 +139,6 @@ pub fn get_license() -> String {
pub fn get_option(key: String) -> String {
get_option_(&key)
// #[cfg(any(target_os = "android", target_os = "ios"))]
// return Config::get_option(&key);
// #[cfg(not(any(target_os = "android", target_os = "ios")))]
// return get_option_(&key);
}
fn get_option_(key: &str) -> String {
@ -208,7 +204,6 @@ pub fn get_sound_inputs() -> Vec<String> {
let mut a = Vec::new();
#[cfg(not(target_os = "linux"))]
{
// TODO TEST
fn get_sound_inputs_() -> Vec<String> {
let mut out = Vec::new();
use cpal::traits::{DeviceTrait, HostTrait};
@ -236,7 +231,7 @@ pub fn get_sound_inputs() -> Vec<String> {
a.push(name);
}
}
#[cfg(target_os = "linux")] // TODO
#[cfg(target_os = "linux")]
{
let inputs: Vec<String> = crate::platform::linux::get_pa_sources()
.drain(..)

@ -35,7 +35,6 @@ lazy_static::lazy_static! {
#[derive(Clone, Default)]
pub struct Session<T: InvokeUiSession> {
pub cmd: String,
pub id: String,
pub password: String,
pub args: Vec<String>,
@ -53,7 +52,7 @@ impl<T: InvokeUiSession> Session<T> {
pub fn get_image_quality(&self) -> String {
self.lc.read().unwrap().image_quality.clone()
}
/// Get custom image quality.
pub fn get_custom_image_quality(&self) -> Vec<i32> {
self.lc.read().unwrap().custom_image_quality.clone()
}
@ -1115,7 +1114,6 @@ impl<T: InvokeUiSession> Interface for Session<T> {
crate::platform::windows::add_recent_document(&path);
}
}
// TODO use event callbcak
#[cfg(not(any(target_os = "android", target_os = "ios")))]
self.start_keyboard_hook();
}
@ -1158,8 +1156,6 @@ impl<T: InvokeUiSession> Interface for Session<T> {
}
}
// TODO use event callbcak
// sciter only
#[cfg(not(any(target_os = "android", target_os = "ios")))]
impl<T: InvokeUiSession> Session<T> {
fn start_keyboard_hook(&self) {