For the login part of the app I decided to also load everything else but in the background, so that Mentions, Favourites, and Discover are available straight away (within a few seconds anyway). Important, though, is that I don't hold you up initially.
I added more spacing to the feed item, so it doesn't look so condensed. Think it looks good.
Just getting back to work with the Profile screen. I'm using colours inspired from my own site, just to keep it simple. There will be more themes down the line.
Right, time for a break now until the evening. Thanks for reading and I'll see you perhaps tonight.
Starting to mock up the profile screen. I use the red so I can see the header area nicely. Ignore the posts, they are just the normal feed for now.
There are some technical limitations with grabbing the data first time around. Here is the API call, which grabs 40 posts (although I set a count of 20) - just a bug.
That would be 7 seconds of waiting for seeing any type of profile information and posts. Setting the count to 10 (which returns 20 post items for the user) has a similar response time. That's not super great. I've spoken to Manton about this already and I'm hoping there will be a few updates to this soon.
To mitigate this, on first time load, I'm actually passing the data that I do have, from the post, to the view - this way I can show the avatar, name, username and website address straight away. Then my plan is to fire off two requests, one empty with no posts (count = 0) and one with posts. The count = 0 request usually returns under 2 seconds, which means I can grab the profile data and all other related things that I'll need to show like the following count and, of course, the bio. Then we just need to wait for the posts to come back. Once we have this data, I'm going to keep it in the cache, which means it will load from cache as soon as you come back to the particular profile. This should keep loading time to an absolute minimum.
With it loading from cache I'll do a normal request to the API, with posts, in the background so I can update it if it changes and rewrite anything we have in cache.
Full belly. Digesting. Here is my Profile screen sketch. Now to implement.
Next task will be to work on the User Profile screen. I'm going to be using a different design, but I need to sketch it out first on a piece of paper. However, first I'm having a break and lunch.
And now testing Android quickly. Had a few issues as I'm also playing with swipe-able actions on each cell. Fixed that now, mentions working. The text is grey on Android if you set no colour, kinda weird - but I will tackle that.
Let there be Mentions:
Here I'm saving the User Mentions. Of note, you can see I pass in the 'Account.currentUser' to the AsyncStorage call. You can guess why I do that :)
Here is a code snippet where I go about grabbing all the Mentions. Not perfect, but nothing ever is. It works and I'm happy with it. For info, the 'Account.currentUserToken' is the currently set/selected user account model. Oh and I don't use "count" just yet - I need to refactor that params stuff.
Size matters! 5MB so far, gives me room to play. And yes, I've been publishing regularly up to the internal TestFlight, just so I can test it and keep an eye on it. Actually found a few fatal "TestFlight only" bugs.
On a side note, Gluon works on iOS 9 and upwards and I got all the way down to Android 7.1. I might be able to reduce the Android version even more. Some early screenshots for you:
More shadows... needs more TLC though. For login, I'm going through several steps to grab your profile and your main feed before actually going onwards to the feed screen. So you get the illusion it's quick and you don't look at an empty screen.
I'm playing with shadows too, to add a bit of depth to the app (see the bottom loading indicator). I feel most apps just feel really really flat. Going to explore it more as I work on the general UI of it. However, for now it's important the app works.
For my first task, I'll be working on the mentions screen. It's currently empty. Should be relatively quick as it's similar logic to the main feed. I already have Discover and Favourites in there and working nicely.