18th March 2018

Some more work going on in Slate today.

The next area I’m going to work on is speeding up the conversion from a post’s content (which is html), into itโ€™s rich text counterpart (NSAttributedString).

The way it used to work was, it converted all the content, including all the inline images. Which would dramatically decrease speed, as it downloaded them synchronously. It meant I had nearly zero control over how the content was transformed or presented.

So the obvious way to test this was to remove the images from the posts as I’m parsing them. I did this with a small bit of regex, and it’s so much better. It can of course still be improved, but this was a massive boost in the right direction.

Obviously I can’t just keep all images hidden in the timeline, but one of my plans was to try and separate inline images into their own section anyway. This would also allow me to add a tap to preview action, and just generally better support for additional media/attachments.

Along with a few extra changes to the style, and maybe support for themes, this is what will be in v0.2.

One response to “Slate Development Log #3”

  1. chrislopez says:

    @ChrisHannah Yeah, I had the same issue with images. I originally used SwiftSoup to get the image from the HTML. It used many deprecated APIs, so it will not be used the rewrite.