mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
opt reply hint
opt mention list header tweak Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -6,7 +6,6 @@ import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
|
||||
class SysMsgController
|
||||
extends CommonListController<List<MsgSysItem>?, MsgSysItem> {
|
||||
final pageSize = 20;
|
||||
int? cursor;
|
||||
|
||||
@override
|
||||
@@ -21,9 +20,6 @@ class SysMsgController
|
||||
msgSysUpdateCursor(dataList.first.cursor);
|
||||
}
|
||||
cursor = dataList.last.cursor;
|
||||
if (!isEnd && dataList.length + 1 < pageSize) {
|
||||
isEnd = true;
|
||||
}
|
||||
}
|
||||
|
||||
void msgSysUpdateCursor(int? cursor) {
|
||||
@@ -54,5 +50,5 @@ class SysMsgController
|
||||
|
||||
@override
|
||||
Future<LoadingState<List<MsgSysItem>?>> customGetData() =>
|
||||
MsgHttp.msgFeedNotify(cursor: cursor, pageSize: pageSize);
|
||||
MsgHttp.msgFeedNotify(cursor: cursor);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ class SysMsgPage extends StatefulWidget {
|
||||
|
||||
class _SysMsgPageState extends State<SysMsgPage> {
|
||||
late final _sysMsgController = Get.put(SysMsgController());
|
||||
late final RegExp urlRegExp = RegExp(
|
||||
r'#\{([^}]*)\}\{([^}]*)\}|https?:\/\/[^\s/\$.?#].[^\s]*|www\.[^\s/\$.?#].[^\s]*|【(.*?)】|((\d+))');
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -96,8 +98,8 @@ class _SysMsgPageState extends State<SysMsgPage> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
"${item.timeAt}",
|
||||
maxLines: 1,
|
||||
@@ -106,7 +108,6 @@ class _SysMsgPageState extends State<SysMsgPage> {
|
||||
fontSize: 13,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -125,8 +126,6 @@ class _SysMsgPageState extends State<SysMsgPage> {
|
||||
|
||||
InlineSpan _buildContent(ThemeData theme, String content) {
|
||||
final List<InlineSpan> spanChildren = <InlineSpan>[];
|
||||
RegExp urlRegExp = RegExp(
|
||||
r'#\{([^}]*)\}\{([^}]*)\}|https?:\/\/[^\s/\$.?#].[^\s]*|www\.[^\s/\$.?#].[^\s]*|【(.*?)】|((\d+))');
|
||||
content.splitMapJoin(
|
||||
urlRegExp,
|
||||
onMatch: (Match match) {
|
||||
|
||||
Reference in New Issue
Block a user