mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-21 19:10:12 +08:00
opt: reply msg
This commit is contained in:
@@ -259,53 +259,47 @@ class ReplyItem extends StatelessWidget {
|
|||||||
textDirection: Directionality.of(context),
|
textDirection: Directionality.of(context),
|
||||||
)..layout(maxWidth: constraints.maxWidth);
|
)..layout(maxWidth: constraints.maxWidth);
|
||||||
bool didExceedMaxLines = textPainter.didExceedMaxLines;
|
bool didExceedMaxLines = textPainter.didExceedMaxLines;
|
||||||
return Column(
|
return Semantics(
|
||||||
mainAxisSize: MainAxisSize.min,
|
label: text,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Text.rich(
|
||||||
children: [
|
style: TextStyle(
|
||||||
Semantics(
|
height: 1.75,
|
||||||
label: text,
|
fontSize:
|
||||||
child: Text.rich(
|
Theme.of(context).textTheme.bodyMedium!.fontSize),
|
||||||
style: TextStyle(
|
TextSpan(
|
||||||
height: 1.75,
|
children: [
|
||||||
fontSize:
|
if (replyItem!.isTop!) ...[
|
||||||
Theme.of(context).textTheme.bodyMedium!.fontSize),
|
const WidgetSpan(
|
||||||
TextSpan(
|
alignment: PlaceholderAlignment.top,
|
||||||
children: [
|
child: PBadge(
|
||||||
if (replyItem!.isTop!) ...[
|
text: 'TOP',
|
||||||
const WidgetSpan(
|
size: 'small',
|
||||||
alignment: PlaceholderAlignment.top,
|
stack: 'normal',
|
||||||
child: PBadge(
|
type: 'line',
|
||||||
text: 'TOP',
|
fs: 9,
|
||||||
size: 'small',
|
semanticsLabel: '置顶',
|
||||||
stack: 'normal',
|
|
||||||
type: 'line',
|
|
||||||
fs: 9,
|
|
||||||
semanticsLabel: '置顶',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const TextSpan(text: ' '),
|
|
||||||
],
|
|
||||||
buildContent(
|
|
||||||
context,
|
|
||||||
replyItem!,
|
|
||||||
replyReply,
|
|
||||||
null,
|
|
||||||
textPainter,
|
|
||||||
didExceedMaxLines,
|
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
|
const TextSpan(text: ' '),
|
||||||
|
],
|
||||||
|
buildContent(
|
||||||
|
context,
|
||||||
|
replyItem!,
|
||||||
|
replyReply,
|
||||||
|
null,
|
||||||
|
textPainter,
|
||||||
|
didExceedMaxLines,
|
||||||
),
|
),
|
||||||
),
|
if (didExceedMaxLines)
|
||||||
|
TextSpan(
|
||||||
|
text: '\n查看更多',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
if (didExceedMaxLines)
|
),
|
||||||
Text(
|
|
||||||
'查看更多',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Theme.of(context).colorScheme.primary,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user