opt chat item

Closes #2292

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-06-04 23:45:32 +08:00
parent 038285cbe6
commit 88f0ab1dea

View File

@@ -200,10 +200,8 @@ class ChatItem extends StatelessWidget {
Widget msgTypeCommonShareCard_14(dynamic content, Color textColor) { Widget msgTypeCommonShareCard_14(dynamic content, Color textColor) {
if (content['source'] == '直播') { if (content['source'] == '直播') {
return Column( return GestureDetector(
crossAxisAlignment: CrossAxisAlignment.start, behavior: .opaque,
children: [
GestureDetector(
onTap: () { onTap: () {
dynamic roomId = content['sourceID']; dynamic roomId = content['sourceID'];
if (roomId is String) { if (roomId is String) {
@@ -211,12 +209,14 @@ class ChatItem extends StatelessWidget {
} }
PageUtils.toLiveRoom(roomId); PageUtils.toLiveRoom(roomId);
}, },
child: NetworkImgLayer( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
NetworkImgLayer(
width: 220, width: 220,
height: 123.75, height: 123.75,
src: content['cover'], src: content['cover'],
), ),
),
const SizedBox(height: 6), const SizedBox(height: 6),
Text( Text(
content['title'] ?? "", content['title'] ?? "",
@@ -238,6 +238,7 @@ class ChatItem extends StatelessWidget {
), ),
), ),
], ],
),
); );
} else { } else {
return def(textColor); return def(textColor);
@@ -246,6 +247,7 @@ class ChatItem extends StatelessWidget {
Widget msgTypeArticleCard_12(dynamic content, Color textColor) { Widget msgTypeArticleCard_12(dynamic content, Color textColor) {
return GestureDetector( return GestureDetector(
behavior: .opaque,
onTap: () => Get.toNamed( onTap: () => Get.toNamed(
'/articlePage', '/articlePage',
parameters: { parameters: {
@@ -267,7 +269,7 @@ class ChatItem extends StatelessWidget {
], ],
), ),
const SizedBox(height: 6), const SizedBox(height: 6),
SelectableText( Text(
content['title'] ?? "", content['title'] ?? "",
style: TextStyle( style: TextStyle(
letterSpacing: 0.6, letterSpacing: 0.6,
@@ -278,8 +280,7 @@ class ChatItem extends StatelessWidget {
), ),
if (content['summary'] != null && content['summary'] != '') ...[ if (content['summary'] != null && content['summary'] != '') ...[
const SizedBox(height: 1), const SizedBox(height: 1),
SelectableText( Text(
scrollPhysics: const NeverScrollableScrollPhysics(),
content['summary'], content['summary'],
style: TextStyle( style: TextStyle(
letterSpacing: 0.6, letterSpacing: 0.6,
@@ -570,17 +571,17 @@ class ChatItem extends StatelessWidget {
'unsupported source type: ${content['source']}', 'unsupported source type: ${content['source']}',
); );
} }
return Column( return GestureDetector(
onTap: onTap,
behavior: .opaque,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
GestureDetector( NetworkImgLayer(
onTap: onTap,
child: NetworkImgLayer(
width: 220, width: 220,
height: 123.75, height: 123.75,
src: content['thumb'], src: content['thumb'],
), ),
),
const SizedBox(height: 6), const SizedBox(height: 6),
Text( Text(
content['title'] ?? "", content['title'] ?? "",
@@ -617,6 +618,7 @@ class ChatItem extends StatelessWidget {
), ),
], ],
], ],
),
); );
} }
@@ -749,7 +751,7 @@ class ChatItem extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
SelectableText( Text(
content['title'], content['title'],
style: theme.textTheme.titleMedium!.copyWith( style: theme.textTheme.titleMedium!.copyWith(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,