opt chat item

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

View File

@@ -199,10 +199,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) {
@@ -210,12 +208,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'] ?? "",
@@ -237,6 +237,7 @@ class ChatItem extends StatelessWidget {
), ),
), ),
], ],
),
); );
} else { } else {
return def(textColor); return def(textColor);
@@ -245,6 +246,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: {
@@ -266,7 +268,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,
@@ -277,8 +279,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,
@@ -569,17 +570,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'] ?? "",
@@ -616,6 +617,7 @@ class ChatItem extends StatelessWidget {
), ),
], ],
], ],
),
); );
} }
@@ -756,7 +758,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,