dennisreimann / ioctocat

iOctocat v1 - GitHub for iOS (works on the iPhone, iPad, and iPod Touch)
http://ioctocat.com/
1.65k stars 256 forks source link

Brokenness under iPhone 3.0b4 #14

Closed ussjoin closed 15 years ago

ussjoin commented 15 years ago

I'm using iPhone OS 3.0b4, and with a freshly cloned and compiled version of 0.8.1, I have the following issues:

ussjoin commented 15 years ago

Update for more information: The first set of issues was with iPhone OS 3.0b4 AND iPhoneSDK 3.0. Recompiling under iPhoneSDK 2.2.1 (current stable release), the black cell problem disappears, but the userpics are still all not displayed.

dennisreimann commented 15 years ago

The gravatars are loaded along with a user and cached on the device... hence you'll have to open a user detail view of someone who has a gravatar (the email address needs to be public and he must have an image at gravatar.com) to verify that it doesn't work.

The reason why they aren't loaded directly is: When the feed list gets loaded we just have the username but we need the email to fetch the gravatar. Loading all user details directly would result in too many API calls :(

ussjoin commented 15 years ago

I just checked, and even if I load a user detail view of myself (since I have a Gravatar), it still doesn't show my userpic, either on the user detail view, or on any of the other places in which it should appear. So the explanation still doesn't work-- it really is broken.

Also, while I get that we can't dynamically load gravatars on every load, surely you can load them in the list, and cache them from there? (Even though the first time the list is displayed, it'll be a bigger set of calls)

dennisreimann commented 15 years ago

It seems like your email address is not public - at least it's not shown in the API calls: http://github.com/api/v2/xml/user/show/ussjoin

ussjoin commented 15 years ago

Looks correct-- and most of the people in my feed have similarly non-public email addresses, hence the issue.

It would appear there's not a way to get the picture in the API yet-- which is a bug, but not your bug. So OK, that issue's resolved, but the other issue, of the big black cells with SDK 3.0-- is not.

dennisreimann commented 15 years ago

Is this fixed in the new version? If not: Can you try to fix this yourself or is there anyone else out there who uses the 3.0 and is able to fix it?

ussjoin commented 15 years ago

This is not fixed under SDK 3.0. I can see what the problem is: if you compile under SDK 3.0 (which, if you're an iPhone developer, is just a matter of going and downloading/installing the new one, then changing the dropdown menu) you have a ton of warnings about deprecated function calls (22 total). Those calls are what's setting everything.

I don't have time this week to attempt to fix this; perhaps next week, but someone else could probably do it faster.

dennisreimann commented 15 years ago

Relating the black background issue: In the current state the cells are marked as opaqua and are given a white background, can you test whether this works?

mccv commented 15 years ago

I have some fixes checked in to get rid of deprecation warnings in 3.0. It's basically two instances of

ifdef __IPHONE_3_0

cell.textLabel.font = [UIFont systemFontOfSize:16.0f];
cell.textLabel.text = repository.name;
cell.imageView.image = [UIImage imageNamed:(repository.isPrivate ? @"private.png" : @"public.png")];
#else
cell.font = [UIFont systemFontOfSize:16.0f];
cell.text = repository.name;
cell.image = [UIImage imageNamed:(repository.isPrivate ? @"private.png" : @"public.png")];
#endif

I can't push from my current network location, but can get those in tonight. I think dbloete's fix probably works fine, but probably doesn't hurt to get the deprecations taken care of.

dennisreimann commented 15 years ago

I'd like to keep this kind of distinguishing out of the code... as long as there are just deprecation warnings we can progress without fixing them and keep this for when the final 3.0 SDK is out...

btw: Good to see that they are making the textLabel and imageView explicit... kinda annoying in the 2.0 SDK as you'll experience weird issues when calling members of own cells like that...

mccv commented 15 years ago

No worries. I can duplicate the defect on my machine without your latest commits, so I'll try to verify the fix tonight as well.

dennisreimann commented 15 years ago

Okay, so I finally switched to 3.0 beta 5, because future builds require 3.0 compatibility. Will check the errors this weekend end fix them.

intabulas commented 15 years ago

I just ran it under b5 and all the rendering issues described above are no longer present.

dennisreimann commented 15 years ago

can verify this.

ussjoin commented 15 years ago

I can verify this as well. Sorry for the delay, I was one of those people who got bricked by 3.0b5 and had to do a special downgrade/upgrade maneuver to get the phone back.