Conversation
- Read tag details off the wire, parse, store them - Display primary tag along with each post - Fix various height calculations
- Also handle sites that can't be followed
There was a problem hiding this comment.
This code was already in the app. I just moved it to a category. I've added #583 to localize this and ensure it makes sense for all supported languages.
There was a problem hiding this comment.
It's a pretty good rule of thumb that if you see 86400 in code, it's not the best way to calculate duration in days. Where you'll run into problems is with people using other than a Gregorian calendar or when daylight saving and leap years/seconds come into play.
I'd suggest using NSDateComponents (this code is typed from memory and may not be compilable) -
NSCalendar *calendar = [NSCalendar currentCalendar];
NSUInteger unitFlags = NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit;
NSDateComponents *components = [gregorian components:unitFlags fromDate:startDate toDate:endDate options:0];
// then
NSInteger days = [components day];
NSInteger hours = [components hour];
//etcThere was a problem hiding this comment.
I didn't write this (just moved it), but yeah, to do it 100% right, someone will need to research if this rendering of dates even makes sense in all the languages we support. It's a bigger task that I think we should defer to #583 (this code already exists in the production app).
There was a problem hiding this comment.
Three NSString attributes were added to ReaderPost.
Conflicts: WordPress/Classes/ReaderPostTableViewCell.m
|
Re-added |
|
This looks good with the only comment being the time calculation. Lets make sure that we spend an amount of time with testing the Core Data migration as well from 12-13.
|
|
@astralbodies or, you know, have a test for the migration 😉 https://github.com/wordpress-mobile/WordPress-iOS/blob/develop/WordPress/WordPressTest/AccountMigrationTest.m |
|
@koke - nice! We use the NSInferMappingModelAutomaticallyOption so I was more concerned about people upgrading from 11 to 13. I don't think Core Data is smart enough to apply the mapping model to go from 11 to 12 and then infer the mapping for 12 to 13. |
This is the new design implemented for #485: layout, typography, padding, buttons, and colors. It includes many aesthetic changes as well as an overall code cleanup and refactoring. It only changes the list view, not the detail view.
There are some known shortcomings:
Screenshot (iPhone):

Screenshot (iPad):

Video:
https://cloudup.com/cNo8p0iztTA