Merge branch 'fix'

This commit is contained in:
guozhigq
2024-06-08 15:36:06 +08:00

View File

@ -267,11 +267,8 @@ class ChatItem extends StatelessWidget {
.colorScheme .colorScheme
.secondaryContainer .secondaryContainer
.withOpacity(0.4), .withOpacity(0.4),
borderRadius: const BorderRadius.only( borderRadius: const BorderRadius.all(
topLeft: Radius.circular(16), Radius.circular(16),
topRight: Radius.circular(16),
bottomLeft: Radius.circular(6),
bottomRight: Radius.circular(16),
), ),
), ),
margin: const EdgeInsets.all(12), margin: const EdgeInsets.all(12),
@ -292,8 +289,8 @@ class ChatItem extends StatelessWidget {
const SizedBox(height: 6), const SizedBox(height: 6),
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
RegExp bvRegex = RegExp(r'BV[0-9A-Za-z]{10}', RegExp bvRegex =
caseSensitive: false); RegExp(r'BV[0-9A-Za-z]{10}', caseSensitive: false);
Iterable<Match> matches = Iterable<Match> matches =
bvRegex.allMatches(i['jump_url']); bvRegex.allMatches(i['jump_url']);
if (matches.isNotEmpty) { if (matches.isNotEmpty) {
@ -353,7 +350,7 @@ class ChatItem extends StatelessWidget {
), ),
), ),
Text( Text(
Utils.timeFormat(int.parse(i['field3'])), i['field3'],
style: TextStyle( style: TextStyle(
letterSpacing: 0.6, letterSpacing: 0.6,
height: 1.5, height: 1.5,
@ -364,10 +361,12 @@ class ChatItem extends StatelessWidget {
], ],
)), )),
], ],
)), ),
),
], ],
], ],
)); ),
);
default: default:
return Text( return Text(
content != null && content != '' content != null && content != ''