fixes
This commit is contained in:
@@ -82,7 +82,6 @@ class _FullScreenMediaState extends State<FullScreenMedia>
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
itemBuilder: (context, position) {
|
itemBuilder: (context, position) {
|
||||||
print(widget.mediaAttachments[position].type);
|
|
||||||
if (widget.mediaAttachments[position].type == 'image' ||
|
if (widget.mediaAttachments[position].type == 'image' ||
|
||||||
widget.mediaAttachments[position].type == 'giphy') {
|
widget.mediaAttachments[position].type == 'giphy') {
|
||||||
return PhotoView(
|
return PhotoView(
|
||||||
|
|||||||
@@ -465,7 +465,10 @@ class _ImageFooterState extends State<ImageFooter> {
|
|||||||
widget.mediaAttachments[widget.currentPage].imageUrl ??
|
widget.mediaAttachments[widget.currentPage].imageUrl ??
|
||||||
widget.mediaAttachments[widget.currentPage].assetUrl ??
|
widget.mediaAttachments[widget.currentPage].assetUrl ??
|
||||||
widget.mediaAttachments[widget.currentPage].thumbUrl;
|
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 request = await HttpClient().getUrl(Uri.parse(url));
|
||||||
var response = await request.close();
|
var response = await request.close();
|
||||||
var bytes = await consolidateHttpClientResponseBytes(response);
|
var bytes = await consolidateHttpClientResponseBytes(response);
|
||||||
@@ -583,7 +586,7 @@ class _ImageFooterState extends State<ImageFooter> {
|
|||||||
|
|
||||||
message = (Message()).copyWith(
|
message = (Message()).copyWith(
|
||||||
text: text,
|
text: text,
|
||||||
attachments: attachments,
|
attachments: [attachments[widget.currentPage]],
|
||||||
mentionedUsers: [],
|
mentionedUsers: [],
|
||||||
showInChannel: false,
|
showInChannel: false,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user