diff --git a/lib/src/image_footer.dart b/lib/src/image_footer.dart index c6df304a..9455d8f3 100644 --- a/lib/src/image_footer.dart +++ b/lib/src/image_footer.dart @@ -246,8 +246,6 @@ class _ImageFooterState extends State { } Widget _buildShareModal(context) { - final channel = StreamChannel.of(context).channel; - showDialog( context: context, builder: (context) { @@ -613,19 +611,12 @@ 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();