chore: account for chat details column width in message overlay max width (#1920)

This commit is contained in:
ggurdin 2025-02-25 14:23:36 -05:00 committed by GitHub
parent 897425620d
commit 5564663ce8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 2 deletions

View file

@ -1843,6 +1843,15 @@ class ChatController extends State<ChatPageWithRoom>
setState(() => inputBarHeight = height);
}
}
bool get displayChatDetailsColumn {
try {
return _displayChatDetailsColumn.value;
} catch (e) {
// if not set, default to false
return false;
}
}
// Pangea#
late final ValueNotifier<bool> _displayChatDetailsColumn;

View file

@ -155,8 +155,10 @@ class MessageSelectionPositionerState extends State<MessageSelectionPositioner>
double get _messageMaxWidth {
final double messageMargin =
widget.event.isActivityMessage ? 0 : Avatar.defaultSize + 16 + 8;
final double totalMaxWidth =
(FluffyThemes.columnWidth * 2.5) - messageMargin;
final bool showingDetails = widget.chatController.displayChatDetailsColumn;
final double totalMaxWidth = (FluffyThemes.columnWidth * 2.5) -
(showingDetails ? FluffyThemes.columnWidth : 0) -
messageMargin;
double? maxWidth;
if (_mediaQuery != null) {