feat: Add dm message for thread
This commit is contained in:
@@ -171,6 +171,7 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
|
|
||||||
Command _chosenCommand;
|
Command _chosenCommand;
|
||||||
bool _actionsShrunk = false;
|
bool _actionsShrunk = false;
|
||||||
|
bool _sendAsDm = false;
|
||||||
|
|
||||||
/// The editing controller passed to the input TextField
|
/// The editing controller passed to the input TextField
|
||||||
TextEditingController textEditingController;
|
TextEditingController textEditingController;
|
||||||
@@ -184,9 +185,19 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
_focusNode.unfocus();
|
_focusNode.unfocus();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Padding(
|
child: Column(
|
||||||
padding: const EdgeInsets.all(8.0),
|
mainAxisSize: MainAxisSize.min,
|
||||||
child: _buildTextField(context),
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: _buildTextField(context),
|
||||||
|
),
|
||||||
|
if(widget.parentMessage != null)
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: _buildDmCheckbox(),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -208,6 +219,18 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _buildDmCheckbox() {
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
|
Checkbox(value: _sendAsDm, onChanged: (val) => setState(() {_sendAsDm = val;})),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
|
child: Text('Send also as direct message'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
AnimatedCrossFade _animateSendButton(BuildContext context) {
|
AnimatedCrossFade _animateSendButton(BuildContext context) {
|
||||||
return AnimatedCrossFade(
|
return AnimatedCrossFade(
|
||||||
crossFadeState: ((_messageIsPresent || _attachments.isNotEmpty) &&
|
crossFadeState: ((_messageIsPresent || _attachments.isNotEmpty) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user