Closed evanfoster closed 1 week ago
Based on what I'm seeing in post.dart
, I've made this issue specific to imgur posts coming from Lemmy. This might still be an issue with mbin posts, but the difference in how the post model is constructed in that case probably warrants a different issue.
I think this is an issue with Mbin. If you go to the API request for the post (here), you can see the type
is set to image
, but the image
field is null
, where it should be filled in with an ImageDTO. Either the type
should be image
and the image
key is filled out, or the type should be link
if it's just a link, which in this case, that's what it should be marked as.
The reason Interstellar isn't displaying the link is because of that type
from the API response being set to image
, but if necessary, I could change it so it instead checks if the image
key is missing.
I'll ask on the Mbin matrix and see if they know anything.
This should be fixed in commit a5d2d5e1367875b7c280dc374a25e511d662f72e.
This way, a thread's link is still present if, for some reason, the thread is marked as an image but doesn't actually have an image attached to it.
Describe the bug
Hey there!
When looking at a post from Lemmy that links to an image on imgur, the image is not displayed in the app. Additionally, the source is not displayed, so you must instead tap on the three dot menu, click "Open in Browser", and then click on the link. Here's a screenshot of one such post:
Here's a link to that post: https://kbin.earth/m/pics@lemmy.world/t/347481
Steps to Reproduce
Version
0.6.0
What platform(s) are you seeing the problem on?
Android
Additional context
I'm guessing this is probably caused by imgur's hostility to image hot links. I seem to recall hearing that imgur requires the use of a paid API in order to hotlink to images, although I don't know if that's actually true. Assuming it is, I don't know what the best solution would be. The quick-and-dirty one is to add another check here.
Like, if the image is from imgur, then you could display the source. That'd make it much easier to quickly see the image.