chore: account for chat details column width in message overlay max width (#1920)
This commit is contained in:
parent
897425620d
commit
5564663ce8
2 changed files with 13 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue