mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-27 14:59:02 +08:00
refact: remove redundant escape (#9634)
* refact: remove redundant escape Signed-off-by: fufesou <linlong1266@gmail.com> * flutter, early assert Signed-off-by: fufesou <linlong1266@gmail.com> --------- Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
parent
eb1ef0969c
commit
65683cc3e6
@ -3616,3 +3616,7 @@ List<SubWindowResizeEdge>? get subWindowManagerEnableResizeEdges => isWindows
|
||||
SubWindowResizeEdge.topRight,
|
||||
]
|
||||
: null;
|
||||
|
||||
void earlyAssert() {
|
||||
assert('\1' == '1');
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ WindowType? kWindowType;
|
||||
late List<String> kBootArgs;
|
||||
|
||||
Future<void> main(List<String> args) async {
|
||||
earlyAssert();
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
debugPrint("launch args: $args");
|
||||
|
@ -155,9 +155,9 @@ class _RemotePageState extends State<RemotePage> {
|
||||
var oldValue = _value;
|
||||
_value = newValue;
|
||||
var i = newValue.length - 1;
|
||||
for (; i >= 0 && newValue[i] != '\1'; --i) {}
|
||||
for (; i >= 0 && newValue[i] != '1'; --i) {}
|
||||
var j = oldValue.length - 1;
|
||||
for (; j >= 0 && oldValue[j] != '\1'; --j) {}
|
||||
for (; j >= 0 && oldValue[j] != '1'; --j) {}
|
||||
if (i < j) j = i;
|
||||
var subNewValue = newValue.substring(j + 1);
|
||||
var subOldValue = oldValue.substring(j + 1);
|
||||
@ -206,8 +206,8 @@ class _RemotePageState extends State<RemotePage> {
|
||||
_value = newValue;
|
||||
if (oldValue.isNotEmpty &&
|
||||
newValue.isNotEmpty &&
|
||||
oldValue[0] == '\1' &&
|
||||
newValue[0] != '\1') {
|
||||
oldValue[0] == '1' &&
|
||||
newValue[0] != '1') {
|
||||
// clipboard
|
||||
oldValue = '';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user