mod: show RICH_TEXT_NODE_TYPE_VIEW_PICTURE

Closes #691

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-16 07:33:10 +08:00
parent bc8907b3ef
commit 2cc9324f08
4 changed files with 54 additions and 23 deletions

View File

@@ -45,24 +45,22 @@ Widget content(bool isSave, BuildContext context, item, source, callback) {
),
],
if (richNodes != null)
IgnorePointer(
// 禁用SelectableRegion的触摸交互功能
ignoring: source == 'detail' ? false : true,
child: SelectableRegion(
magnifierConfiguration: const TextMagnifierConfiguration(),
focusNode: FocusNode(),
selectionControls: MaterialTextSelectionControls(),
child: Text.rich(
/// fix 默认20px高度
style: TextStyle(
fontSize: source == 'detail' && !isSave ? 16 : 15,
source == 'detail'
? SelectableRegion(
magnifierConfiguration: const TextMagnifierConfiguration(),
focusNode: FocusNode(),
selectionControls: MaterialTextSelectionControls(),
child: Text.rich(
style: TextStyle(fontSize: !isSave ? 16 : 15),
richNodes,
),
)
: Text.rich(
style: const TextStyle(fontSize: 15),
richNodes,
maxLines: 6,
overflow: TextOverflow.ellipsis,
),
richNodes,
maxLines: source == 'detail' ? null : 6,
overflow: source == 'detail' ? null : TextOverflow.ellipsis,
),
),
),
if (item.modules.moduleDynamic.major != null &&
item.modules.moduleDynamic.major.opus != null &&
item.modules.moduleDynamic.major.opus.pics.isNotEmpty)