mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 16:18:22 +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));
|
_atUserRegex.firstMatch(text.substring(0, offset));
|
||||||
|
|
||||||
if (match != null) {
|
if (match != null) {
|
||||||
updateEditingValue(TextEditingDeltaDeletion(
|
userUpdateTextEditingValue(
|
||||||
oldText: e.oldText,
|
TextEditingDeltaDeletion(
|
||||||
deletedRange: TextRange(start: match.start, end: match.end),
|
oldText: e.oldText,
|
||||||
selection: TextSelection.collapsed(offset: match.start),
|
deletedRange: TextRange(start: match.start, end: match.end),
|
||||||
composing: e.composing,
|
selection: TextSelection.collapsed(offset: match.start),
|
||||||
).apply(_value));
|
composing: e.composing,
|
||||||
|
).apply(_value),
|
||||||
|
SelectionChangedCause.keyboard,
|
||||||
|
);
|
||||||
widget.onDelAtUser?.call(match.group(0)!.trim());
|
widget.onDelAtUser?.call(match.group(0)!.trim());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3290,9 +3293,11 @@ class EditableTextState extends State<EditableText>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextEditingValue value = _value;
|
||||||
for (final TextEditingDelta delta in textEditingDeltas) {
|
for (final TextEditingDelta delta in textEditingDeltas) {
|
||||||
updateEditingValue(delta.apply(_value));
|
value = delta.apply(value);
|
||||||
}
|
}
|
||||||
|
updateEditingValue(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
Reference in New Issue
Block a user