mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt pub textfield
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -3277,12 +3277,15 @@ class EditableTextState extends State<EditableText>
|
||||
_atUserRegex.firstMatch(text.substring(0, offset));
|
||||
|
||||
if (match != null) {
|
||||
updateEditingValue(TextEditingDeltaDeletion(
|
||||
oldText: e.oldText,
|
||||
deletedRange: TextRange(start: match.start, end: match.end),
|
||||
selection: TextSelection.collapsed(offset: match.start),
|
||||
composing: e.composing,
|
||||
).apply(_value));
|
||||
userUpdateTextEditingValue(
|
||||
TextEditingDeltaDeletion(
|
||||
oldText: e.oldText,
|
||||
deletedRange: TextRange(start: match.start, end: match.end),
|
||||
selection: TextSelection.collapsed(offset: match.start),
|
||||
composing: e.composing,
|
||||
).apply(_value),
|
||||
SelectionChangedCause.keyboard,
|
||||
);
|
||||
widget.onDelAtUser?.call(match.group(0)!.trim());
|
||||
return;
|
||||
}
|
||||
@@ -3290,9 +3293,11 @@ class EditableTextState extends State<EditableText>
|
||||
}
|
||||
}
|
||||
|
||||
TextEditingValue value = _value;
|
||||
for (final TextEditingDelta delta in textEditingDeltas) {
|
||||
updateEditingValue(delta.apply(_value));
|
||||
value = delta.apply(value);
|
||||
}
|
||||
updateEditingValue(value);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user