Merge pull request #3033 from pangeachat/3031-translation-got-weird-format-with-short-messages
chore: when showing non-message content in overlay message, set minim…
This commit is contained in:
commit
88a4ef825f
2 changed files with 10 additions and 20 deletions
|
|
@ -107,11 +107,6 @@ class MessageOverlayController extends State<MessageSelectionOverlay>
|
|||
/// Lifecycle
|
||||
/////////////////////////////////////
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
initializeTokensAndMode();
|
||||
|
|
@ -200,20 +195,6 @@ class MessageOverlayController extends State<MessageSelectionOverlay>
|
|||
updateToolbarMode(MessageMode.practiceActivity);
|
||||
return;
|
||||
}
|
||||
|
||||
// if (selectedToken != null) {
|
||||
// updateToolbarMode(selectedToken!.modeForToken);
|
||||
// return;
|
||||
// }
|
||||
|
||||
// Note: this setting is now hidden so this will always be false
|
||||
// leaving this here in case we want to bring it back
|
||||
// if (MatrixState.pangeaController.userController.profile.userSettings
|
||||
// .autoPlayMessages) {
|
||||
// return setState(() => toolbarMode = MessageMode.textToSpeech);
|
||||
// }
|
||||
|
||||
// defaults to noneSelected
|
||||
}
|
||||
|
||||
/// Decides whether an _initialSelectedToken should be used
|
||||
|
|
@ -478,6 +459,12 @@ class MessageOverlayController extends State<MessageSelectionOverlay>
|
|||
|
||||
PangeaTokenText? get selectedSpan => _selectedSpan;
|
||||
|
||||
bool get showingExtraContent =>
|
||||
(showTranslation && translation != null) ||
|
||||
(showSpeechTranslation && speechTranslation != null) ||
|
||||
transcription != null ||
|
||||
transcriptionError != null;
|
||||
|
||||
///////////////////////////////////
|
||||
/// Functions
|
||||
/////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -685,7 +685,10 @@ class MessageSelectionPositionerState extends State<MessageSelectionPositioner>
|
|||
OverlayCenterContent(
|
||||
event: widget.event,
|
||||
messageHeight: _originalMessageSize.height,
|
||||
messageWidth: _originalMessageSize.width,
|
||||
messageWidth: widget
|
||||
.overlayController.showingExtraContent
|
||||
? max(_originalMessageSize.width, 150)
|
||||
: _originalMessageSize.width,
|
||||
maxWidth: widget.overlayController.maxWidth,
|
||||
overlayController: widget.overlayController,
|
||||
chatController: widget.chatController,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue