Merge pull request #5187 from 21pages/fix

fix IDTextEditingController extra character
This commit is contained in:
RustDesk 2023-07-29 13:54:02 +08:00 committed by GitHub
commit 3c4852a254
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -26,6 +26,8 @@ class IDTextInputFormatter extends TextInputFormatter {
selection: TextSelection.collapsed(
offset: newID.length - selectionIndexFromTheRight,
),
// https://github.com/flutter/flutter/issues/78066#issuecomment-797869906
composing: newValue.composing,
);
}
}

View File

@ -363,14 +363,13 @@ pub fn check_config() {
}
pub fn check_config_process() {
use hbb_common::sysinfo::{ProcessExt, System, SystemExt};
use std::sync::Once;
let f = || {
// Clear to avoid checking process errors
// But when the program is just started, the configuration file has not been updated, and the new connection will read an empty configuration
HwCodecConfig::clear();
if let Ok(exe) = std::env::current_exe() {
if let Some(file_name) = exe.file_name().to_owned() {
if let Some(_) = exe.file_name().to_owned() {
let arg = "--check-hwcodec-config";
if let Ok(mut child) = std::process::Command::new(exe).arg(arg).spawn() {
// wait up to 10 seconds