opt reply hint

opt mention list header

tweak

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-07 13:38:54 +08:00
parent 74f7c5d0ea
commit 5ff6ef8801
7 changed files with 28 additions and 27 deletions

View File

@@ -648,7 +648,7 @@ class _ArticlePageState extends State<ArticlePage>
return SliverPersistentHeader(
pinned: true,
delegate: CustomSliverPersistentHeaderDelegate(
extent: 40,
extent: 45,
bgColor: theme.colorScheme.surface,
child: Container(
height: 45,

View File

@@ -113,10 +113,10 @@ abstract class ReplyController<R> extends CommonListController<R, ReplyInfo> {
assert(replyItem != null || (oid != null && replyType != null));
String? hint;
try {
if (subjectControl != null) {
if (subjectControl!.hasSwitcherType() &&
subjectControl!.switcherType != 1 &&
subjectControl!.hasRootText()) {
if (subjectControl != null && subjectControl!.hasRootText()) {
if ((subjectControl!.hasSwitcherType() &&
subjectControl!.switcherType != 1) ||
subjectControl!.rootText.contains('可发评论')) {
hint = subjectControl!.rootText;
}
}

View File

@@ -597,7 +597,7 @@ class _CreateDynPanelState extends CommonRichTextPubPageState<CreateDynPanel> {
}
controller.restoreChatPanel();
},
icon: const Icon(Icons.bar_chart_rounded, size: 22),
icon: const Icon(Icons.bar_chart_rounded, size: 24),
tooltip: '投票',
selected: false,
),

View File

@@ -25,16 +25,11 @@ class _CreateVotePageState extends State<CreateVotePage> {
tag: Utils.generateRandomString(8));
late final imagePicker = ImagePicker();
late Divider _divider;
late TextStyle _leadingStyle;
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
_divider = Divider(
height: 1,
color: theme.colorScheme.outline.withValues(alpha: 0.1),
);
_leadingStyle = TextStyle(
fontSize: 15,
color: theme.colorScheme.onSurfaceVariant.withValues(alpha: 0.9),
@@ -42,7 +37,10 @@ class _CreateVotePageState extends State<CreateVotePage> {
final padding = MediaQuery.paddingOf(context);
final divider = [
const SizedBox(height: 10),
_divider,
Divider(
height: 1,
color: theme.colorScheme.outline.withValues(alpha: 0.1),
),
const SizedBox(height: 10),
];
return Scaffold(

View File

@@ -1,6 +1,7 @@
import 'dart:async';
import 'dart:math';
import 'package:PiliPlus/common/widgets/custom_sliver_persistent_header_delegate.dart';
import 'package:PiliPlus/common/widgets/draggable_sheet/draggable_scrollable_sheet_topic.dart'
as topic_sheet;
import 'package:PiliPlus/common/widgets/loading_widget/loading_widget.dart';
@@ -193,11 +194,18 @@ class _DynMentionPanelState extends State<DynMentionPanel> {
}
return SliverMainAxisGroup(
slivers: [
SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16, vertical: 6),
child: Text(group.groupName!),
SliverPersistentHeader(
pinned: true,
delegate: CustomSliverPersistentHeaderDelegate(
extent: 40,
bgColor: theme.colorScheme.surface,
child: Container(
height: 40,
alignment: Alignment.centerLeft,
padding:
const EdgeInsets.symmetric(horizontal: 16),
child: Text(group.groupName!),
),
),
),
SliverList.builder(

View File

@@ -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);
}

View File

@@ -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) {