Use blur hash for loading images and sensitive media
Closes #36 (closed), which says that while CW'd media is properly hidden (under "Show More") just standalone sensitive media is not. Creating situations like these:
(just imagine that meme is your preferred unsavory image, which is not good. the first post is tagged with just sensitive media, while the other one is CW'd)
So to fix this, I implemented something along the lines of Mastodon's web interface:
(I couldn't find my original sensitive media post, due to broken scrolling in master - so pretend this was tagged as such.)
By default, sensitive media - including CW'd is now always shown but blurred. The relevant blurhash stuff was taken from NeoChat (thanks!) And similiar to the Mastodon web interface, clicking the image will show it. Also I have added a button to then rehide the media, if you so choose. Unlike the web interface, you can do this to any image, which is a useful feature implemented by other clients.
However there is a couple of issues at the moment:
- When the timeline is refreshed, your preference on media hiding is reset due to the "show media" property being stored on the QML side and not on the model side. Should I store it there instead and is it worth it? Note that this just means sensitive media is re-hidden, the only stuff that is shown again is stuff you temporarily hid. I'm not sure if Mastodon Web permanently stores your hide media preferences.
- The QML side could probably use another look over, but the functionality does work pretty well.