diff --git a/lib/src/image_footer.dart b/lib/src/image_footer.dart index dcc5c5d8..3a223de2 100644 --- a/lib/src/image_footer.dart +++ b/lib/src/image_footer.dart @@ -212,8 +212,6 @@ class _ImageFooterState extends State { } Widget _buildShareModal(context) { - final channel = StreamChannel.of(context).channel; - showDialog( context: context, builder: (context) { @@ -581,19 +579,14 @@ class _ImageFooterState extends State { 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();