opt: pick avatar

This commit is contained in:
bggRGjQaUbCoE
2024-11-01 16:02:11 +08:00
parent 23bd32a35c
commit 7d0056464a
4 changed files with 12 additions and 2 deletions

View File

@@ -169,7 +169,7 @@ class _SysMsgPageState extends State<SysMsgPage> {
InlineSpan _buildContent(String content) {
final List<InlineSpan> spanChildren = <InlineSpan>[];
RegExp urlRegExp = RegExp(
'#\\{([^}]*)\\}\\{"?([^}]*)"?\\}|https?:\\/\\/[^\\s/\$.?#].[^\\s]*|www\\.[^\\s/\$.?#].[^\\s]*');
r'#\{([^}]*)\}\{([^}]*)\}|https?:\/\/[^\s/\$.?#].[^\s]*|www\.[^\s/\$.?#].[^\s]*');
content.splitMapJoin(
urlRegExp,
onMatch: (Match match) {
@@ -181,7 +181,7 @@ class _SysMsgPageState extends State<SysMsgPage> {
recognizer: TapGestureRecognizer()
..onTap = () {
try {
Uri uri = Uri.parse(match[2]!);
Uri uri = Uri.parse(match[2]!.replaceAll('"', ''));
PiliScheme.routePush(uri);
} catch (err) {
SmartDialog.showToast(err.toString());