Vincent Ritter

Gluon - Evening 3 Update

4 hours in and I'm happy to say I have made good progress. Well, at least I'm happy with what I managed. Although, it's not what I had in mind - but here we are.

First of, I took it closely to rewrite some of the data logic on how posts are grabbed from Micro.blog. As I save them locally to device, for quick launch times, I wanted to make sure I do this in a quick way without having to check through existing posts. The API is pretty good, so I could grab posts after a certain post ID. So that is what I do now. So much better in my eyes.

I found a small bug on the login screen that would just keep trying to log in with an expired key, after opening an email, every time you typed a letter into the input. So basically it kept thinking I was providing that token that was loaded up from the email.

I did want to work on the profile screen and other sections like Discover etc... however, I started fiddling around with the post views. So, here are my very early preliminary results:

I'm yet to implement handling of the links within the post, although I have it set up to print to the console for now - at least I know what is incoming. With that I'm planning to just check what the link is and if I should open Safari (via app) or load a profile if it's an "@" to someone.

Images will also be dealt with. I didn't manage to implement what I wanted just yet for images. Basically I want to render them after the post in little squares, and size those depending on how many there are. Tapping on them will open an image view.

All images are cached and should only be pulled once to the device... this is only temp storage, so if the app decides to kill itself it may loose those cached images at some stage. Better than nothing. Oh and they lazy load too.


Oh, good point actually - I'm using square profile images. That's on purpose as I'm not a fan of circled images. Maybe I look at my keyboard keys too much... I'll probably make it a user option at some stage though, so you can customise that... plus some other stuff that I'll reveal as I go.

Another point of note is that I won't implement an icon/message of "new" posts that are loaded in (like TweetBot did - when I used it). I'd like to avoid the feeling of "OMG I need to read all of these". Rather have you in the moment instead of sitting in a coffee shop with your family/friends and trying to go through the full list, because you feel obliged. Personal preference to be honest...

When you first load the app you only get back 30 - 40 posts on an initial load of 'posts/all/' on Micro.blog, one thing I wanted to solve is, as you reach the bottom of the list, is to load in older posts and add them to the list. Happy to say, this works nicely. I grab 15 posts at a time.

I do need to figure out how to communicate this to the user, that I'm loading posts and that they are ready and that you can scroll down for more. My current plan is to show a loading icon at the bottom of the view, instead of top, and then check if posts were returned or not - if so just say: "More posts loaded below" or something like that.

I'll also need to figure out how to remove a post, if it was deleted... I don't want to think about that just yet though...

That's it for now. Tomorrow evening I'd like to work on the user profile page.

Stay in the loop

Subscribe to the RSS feed...