simplify send message
This commit is contained in:
@@ -212,8 +212,6 @@ class _ImageFooterState extends State<ImageFooter> {
|
||||
}
|
||||
|
||||
Widget _buildShareModal(context) {
|
||||
final channel = StreamChannel.of(context).channel;
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
@@ -581,19 +579,14 @@ class _ImageFooterState extends State<ImageFooter> {
|
||||
|
||||
await c.create();
|
||||
|
||||
Future sendingFuture;
|
||||
Message message;
|
||||
|
||||
message = (Message()).copyWith(
|
||||
final message = Message(
|
||||
text: text,
|
||||
attachments: [attachments[widget.currentPage]],
|
||||
mentionedUsers: [],
|
||||
showInChannel: false,
|
||||
);
|
||||
|
||||
sendingFuture = c.sendMessage(message);
|
||||
|
||||
await sendingFuture;
|
||||
await c.sendMessage(message);
|
||||
}
|
||||
|
||||
_selectedUsers.clear();
|
||||
|
||||
Reference in New Issue
Block a user