fix: App crashes on window resize in chat
This commit is contained in:
parent
c65c6f7e09
commit
a5ceab58d3
1 changed files with 28 additions and 34 deletions
|
|
@ -1360,41 +1360,35 @@ class ChatController extends State<ChatPageWithRoom>
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ChatView(this),
|
child: ChatView(this),
|
||||||
),
|
),
|
||||||
AnimatedSize(
|
ValueListenableBuilder(
|
||||||
duration: FluffyThemes.animationDuration,
|
valueListenable: _displayChatDetailsColumn,
|
||||||
curve: FluffyThemes.animationCurve,
|
builder: (context, displayChatDetailsColumn, _) =>
|
||||||
child: ValueListenableBuilder(
|
!FluffyThemes.isThreeColumnMode(context) ||
|
||||||
valueListenable: _displayChatDetailsColumn,
|
room.membership != Membership.join ||
|
||||||
builder: (context, displayChatDetailsColumn, _) {
|
!displayChatDetailsColumn
|
||||||
if (!FluffyThemes.isThreeColumnMode(context) ||
|
? const SizedBox(
|
||||||
room.membership != Membership.join ||
|
height: double.infinity,
|
||||||
!displayChatDetailsColumn) {
|
width: 0,
|
||||||
return const SizedBox(
|
)
|
||||||
height: double.infinity,
|
: Container(
|
||||||
width: 0,
|
width: FluffyThemes.columnWidth,
|
||||||
);
|
clipBehavior: Clip.hardEdge,
|
||||||
}
|
decoration: BoxDecoration(
|
||||||
return Container(
|
border: Border(
|
||||||
width: FluffyThemes.columnWidth,
|
left: BorderSide(
|
||||||
clipBehavior: Clip.hardEdge,
|
width: 1,
|
||||||
decoration: BoxDecoration(
|
color: theme.dividerColor,
|
||||||
border: Border(
|
),
|
||||||
left: BorderSide(
|
),
|
||||||
width: 1,
|
),
|
||||||
color: theme.dividerColor,
|
child: ChatDetails(
|
||||||
|
roomId: roomId,
|
||||||
|
embeddedCloseButton: IconButton(
|
||||||
|
icon: const Icon(Icons.close),
|
||||||
|
onPressed: toggleDisplayChatDetailsColumn,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
|
||||||
child: ChatDetails(
|
|
||||||
roomId: roomId,
|
|
||||||
embeddedCloseButton: IconButton(
|
|
||||||
icon: const Icon(Icons.close),
|
|
||||||
onPressed: toggleDisplayChatDetailsColumn,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue