mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-05-11 18:36:11 +02: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
3 changed files with 9 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue