mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-07 10:37:51 +08:00
opt reply cardLabels
Closes #1925 Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -455,6 +455,27 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
tapTargetSize: .shrinkWrap,
|
tapTargetSize: .shrinkWrap,
|
||||||
padding: WidgetStatePropertyAll(.zero),
|
padding: WidgetStatePropertyAll(.zero),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Widget? dialogBtn;
|
||||||
|
if (replyLevel == 2 && needDivider && replyItem.id != replyItem.dialog) {
|
||||||
|
dialogBtn = SizedBox(
|
||||||
|
height: 32,
|
||||||
|
child: TextButton(
|
||||||
|
onPressed: showDialogue,
|
||||||
|
style: buttonStyle,
|
||||||
|
child: Text('查看对话', style: textStyle),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else if (replyLevel == 3 && replyItem.parent != replyItem.root) {
|
||||||
|
dialogBtn = SizedBox(
|
||||||
|
height: 32,
|
||||||
|
child: TextButton(
|
||||||
|
onPressed: jumpToDialogue,
|
||||||
|
style: buttonStyle,
|
||||||
|
child: Text('跳转回复', style: textStyle),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(width: 36),
|
const SizedBox(width: 36),
|
||||||
@@ -491,35 +512,16 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
buttonStyle,
|
buttonStyle,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 2),
|
const SizedBox(width: 2),
|
||||||
] else if (replyItem.replyControl.cardLabels.isNotEmpty) ...[
|
] else if (replyControl.cardLabels.isNotEmpty) ...[
|
||||||
Text(
|
Text(
|
||||||
replyItem.replyControl.cardLabels
|
dialogBtn != null
|
||||||
.map((e) => e.textContent)
|
? replyControl.cardLabels.first.textContent
|
||||||
.join(' '),
|
: replyControl.cardLabels.map((e) => e.textContent).join(' '),
|
||||||
style: textStyle.copyWith(color: theme.colorScheme.secondary),
|
style: textStyle.copyWith(color: theme.colorScheme.secondary),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 2),
|
const SizedBox(width: 2),
|
||||||
],
|
],
|
||||||
if (replyLevel == 2 && needDivider && replyItem.id != replyItem.dialog)
|
?dialogBtn,
|
||||||
SizedBox(
|
|
||||||
height: 32,
|
|
||||||
child: TextButton(
|
|
||||||
onPressed: showDialogue,
|
|
||||||
style: buttonStyle,
|
|
||||||
child: Text('查看对话', style: textStyle),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
else if (replyLevel == 3 &&
|
|
||||||
needDivider &&
|
|
||||||
replyItem.parent != replyItem.root)
|
|
||||||
SizedBox(
|
|
||||||
height: 32,
|
|
||||||
child: TextButton(
|
|
||||||
onPressed: jumpToDialogue,
|
|
||||||
style: buttonStyle,
|
|
||||||
child: Text('跳转回复', style: textStyle),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
ZanButtonGrpc(replyItem: replyItem),
|
ZanButtonGrpc(replyItem: replyItem),
|
||||||
const SizedBox(width: 5),
|
const SizedBox(width: 5),
|
||||||
|
|||||||
Reference in New Issue
Block a user