fix part screen voice input and adaption

This commit is contained in:
Chen Li
2025-08-16 14:28:15 +08:00
parent 9715a18c65
commit 8b0f5a92d4
5 changed files with 12 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -24,7 +24,7 @@ class _PartScreenState extends State<PartScreen> {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) {
final messageService = Provider.of<MessageService>(context, listen: false);
messageService.initializeEmpty();
messageService.removeNonListeningMessages();
setState(() {
_isInitialized = true;
});

View File

@@ -381,4 +381,9 @@ class MessageService extends ChangeNotifier {
_messages.clear();
notifyListeners();
}
void removeNonListeningMessages() {
_messages.removeWhere((message) => message.status != MessageStatus.listening);
notifyListeners();
}
}

View File

@@ -329,8 +329,8 @@ class _ChatBubbleState extends State<ChatBubble> {
padding: const EdgeInsets.only(left: 12),
child: Image.asset(
'assets/images/copy.png',
width: 24,
height: 24
width: 22,
height: 22
),
),
),
@@ -345,9 +345,9 @@ class _ChatBubbleState extends State<ChatBubble> {
padding: const EdgeInsets.only(left: 12),
child: _liked
? Image.asset('assets/images/liked2.png',
width: 24, height: 24)
width: 22, height: 22)
: Image.asset('assets/images/liked1.png',
width: 24, height: 24),
width: 22, height: 22),
),
),
InkWell(
@@ -361,9 +361,9 @@ class _ChatBubbleState extends State<ChatBubble> {
padding: const EdgeInsets.only(left: 12),
child: _disliked
? Image.asset('assets/images/disliked2.png',
width: 24, height: 24)
width: 22, height: 22)
: Image.asset('assets/images/disliked1.png',
width: 24, height: 24)),
width: 22, height: 22)),
),
],
),