This commit is contained in:
Deven Joshi
2020-11-30 20:30:32 +05:30
parent 058ecc9a0d
commit 37ad5d72be
2 changed files with 5 additions and 3 deletions
-1
View File
@@ -82,7 +82,6 @@ class _FullScreenMediaState extends State<FullScreenMedia>
});
},
itemBuilder: (context, position) {
print(widget.mediaAttachments[position].type);
if (widget.mediaAttachments[position].type == 'image' ||
widget.mediaAttachments[position].type == 'giphy') {
return PhotoView(
+5 -2
View File
@@ -465,7 +465,10 @@ class _ImageFooterState extends State<ImageFooter> {
widget.mediaAttachments[widget.currentPage].imageUrl ??
widget.mediaAttachments[widget.currentPage].assetUrl ??
widget.mediaAttachments[widget.currentPage].thumbUrl;
var type = url?.split('?')?.first?.split('.')?.last ?? 'jpg';
var type =
widget.mediaAttachments[widget.currentPage].type == 'image'
? 'jpg'
: url?.split('?')?.first?.split('.')?.last ?? 'jpg';
var request = await HttpClient().getUrl(Uri.parse(url));
var response = await request.close();
var bytes = await consolidateHttpClientResponseBytes(response);
@@ -583,7 +586,7 @@ class _ImageFooterState extends State<ImageFooter> {
message = (Message()).copyWith(
text: text,
attachments: attachments,
attachments: [attachments[widget.currentPage]],
mentionedUsers: [],
showInChannel: false,
);