fix: return bot STT from speech to text local (#3581)
This commit is contained in:
parent
63c77b067a
commit
cef27aa4ef
2 changed files with 17 additions and 2 deletions
|
|
@ -234,6 +234,15 @@ class PangeaMessageEvent {
|
|||
}).toSet();
|
||||
|
||||
SpeechToTextModel? getSpeechToTextLocal() {
|
||||
final rawBotTranscription =
|
||||
event.content.tryGetMap(ModelKey.botTranscription);
|
||||
|
||||
if (rawBotTranscription != null) {
|
||||
return SpeechToTextModel.fromJson(
|
||||
Map<String, dynamic>.from(rawBotTranscription),
|
||||
);
|
||||
}
|
||||
|
||||
return representations
|
||||
.firstWhereOrNull(
|
||||
(element) => element.content.speechToText != null,
|
||||
|
|
@ -268,7 +277,8 @@ class PangeaMessageEvent {
|
|||
Map<String, dynamic>.from(rawBotTranscription),
|
||||
);
|
||||
|
||||
_representations?.add(
|
||||
_representations ??= [];
|
||||
_representations!.add(
|
||||
RepresentationEvent(
|
||||
timeline: timeline,
|
||||
parentMessageEvent: _event,
|
||||
|
|
|
|||
|
|
@ -317,7 +317,12 @@ class MessageSelectionPositionerState extends State<MessageSelectionPositioner>
|
|||
|
||||
bool get _hasFooterOverflow {
|
||||
if (_screenHeight == null) return false;
|
||||
final bottomOffset = _originalMessageOffset.dy + _contentHeight;
|
||||
final bottomOffset = _originalMessageOffset.dy +
|
||||
originalMessageSize.height +
|
||||
reactionsHeight +
|
||||
AppConfig.toolbarMenuHeight +
|
||||
4.0;
|
||||
|
||||
return bottomOffset > _screenHeight!;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue