Closed thatrobotdev closed 6 years ago
Thanks for your report! In the case of your two Rewards where the images are there to add flavour, it wouldn't matter so much if they weren't shown, as you suggest, however other players might have tasks with images that are important to the meaning and so it would be helpful for them for the images to be shown in the mobile apps.
Oh, sorry if my text wasn't clear @Alys. I meant that the images would still be shown, but the messy text in the title wouldn't.
Maybe alt text for the image could still be shown, in a different way.
I could try to show the images, found some code on StackOverflow that I should be learning, great way to figure out if I know what I'm doing.
@LunarGem, that would be amazing!
Which code would this be? Is it compatible with the markdown library we are using?
The second answer here or perhaps something else. I believe it's just an ImageView and internet permissions, but not sure what would mess with the markdown library.
I could also try to use Glide or Picasso.
I don't think that actually helps in this case. Since the problem is about images embedded in the markdown. Which means there is not imageview that can be used to display any images, since they have to be embedded in the text.
Which markdown library do we use? Perhaps I could troubleshoot or find a workaround. An interesting idea would be allowing the user to set the custom reward image like the official rewards have. Then we could potentially not need this... Any thoughts? I'm just brainstorming.
@LunarGem The user might want to use two or more images in a Reward (or in any of their tasks), so allowing them to do that with markdown is the most flexible solution. The website uses this markdown library: https://github.com/HabitRPG/habitica-markdown I have no knowledge of how the app does markdown. :)
@Alys Did we have any plans of letting users set custom rewards images, though? It's something I've really wished were possible. I'll see what I can do looking at the library.
setting custom images through markdown is possible (as alys mentioned), but we don't have plans to allow users to set a custom image that appears on the left side of the reward.
The Android app uses CWAC Anddown for markdown.
Okay so I've been thinking about this, and it looks like the images are recognized for what they are but aren't loaded. Any clue why that might be?
I haven't looked further into how the images are currently handled yet. The original PR where markdown support was added can be found here: https://github.com/HabitRPG/habitica-android/pull/348 maybe there is some more info there.
created an issue that better describes what is needed https://github.com/HabitRPG/habitica-android/issues/904
In this photo, is my rewards list of custom rewards created from challenges on computer habitica:
In this photo, is my rewards list of custom rewards created from challenges on mobile habitica:
See the difference? The second picture includes the part of the title that gives the challenge a photo. I propose on mobile, that this part is not shown to the user.
Ex: ![image alt](image url)Image Title should only show Image Title.
So, "![balist] (https://s2.postimg.org/m7d7jndu1/ballisa.png)Fire the Ballista!" should only show in the title of the reward "Fire the Ballista!"