opt: dyn text

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-16 13:59:28 +08:00
parent 8291359cda
commit 83205caa80
3 changed files with 12 additions and 8 deletions

View File

@@ -58,8 +58,8 @@ Widget content(context, item, source, callback) {
fontSize: source == 'detail' ? 16 : 15, fontSize: source == 'detail' ? 16 : 15,
), ),
richNodes, richNodes,
maxLines: source == 'detail' ? 999 : 6, maxLines: source == 'detail' ? null : 6,
overflow: TextOverflow.ellipsis, overflow: source == 'detail' ? null : TextOverflow.ellipsis,
), ),
), ),
), ),

View File

@@ -65,8 +65,8 @@ class ContentGrpc extends StatelessWidget {
/// fix 默认20px高度 /// fix 默认20px高度
style: const TextStyle(height: 0), style: const TextStyle(height: 0),
richNodes, richNodes,
maxLines: source == 'detail' ? 999 : 6, maxLines: source == 'detail' ? null : 6,
overflow: TextOverflow.ellipsis, overflow: source == 'detail' ? null : TextOverflow.ellipsis,
), ),
), ),
), ),

View File

@@ -97,8 +97,10 @@ Widget forWard(item, context, source, callback, {floor = 1}) {
Text.rich( Text.rich(
richNodes, richNodes,
// 被转发状态(floor=2) 隐藏 // 被转发状态(floor=2) 隐藏
maxLines: source == 'detail' && floor != 2 ? 999 : 4, maxLines: source == 'detail' && floor != 2 ? null : 4,
overflow: TextOverflow.ellipsis, overflow: source == 'detail' && floor != 2
? null
: TextOverflow.ellipsis,
), ),
if (hasPics) ...[ if (hasPics) ...[
Text.rich( Text.rich(
@@ -214,8 +216,10 @@ Widget forWard(item, context, source, callback, {floor = 1}) {
Text.rich( Text.rich(
richNodes, richNodes,
// 被转发状态(floor=2) 隐藏 // 被转发状态(floor=2) 隐藏
maxLines: source == 'detail' && floor != 2 ? 999 : 4, maxLines: source == 'detail' && floor != 2 ? null : 4,
overflow: TextOverflow.ellipsis, overflow: source == 'detail' && floor != 2
? null
: TextOverflow.ellipsis,
), ),
], ],
) )