diff --git a/.gitignore b/.gitignore index 5432c850e..e7e47452d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ logs/*.log logs/*.log.* logs/*.pid *.pyc +static.tgz static/* local_settings.py media/iphone/NewsBlur/build @@ -20,4 +21,4 @@ xcuserdata *.mode1v3 *.pbxuser media/maintenance.html -config/settings \ No newline at end of file +config/settings diff --git a/media/ios/Classes/DataUtilities.h b/media/ios/Classes/DataUtilities.h new file mode 100644 index 000000000..61316cd94 --- /dev/null +++ b/media/ios/Classes/DataUtilities.h @@ -0,0 +1,15 @@ +// +// DataUtilities.h +// NewsBlur +// +// Created by Roy Yang on 7/20/12. +// Copyright (c) 2012 NewsBlur. All rights reserved. +// + +#import + +@interface DataUtilities : NSObject + ++ (NSArray *)updateUserProfiles:(NSArray *)userProfiles withNewUserProfiles:(NSArray *)newUserProfiles; + +@end diff --git a/media/ios/Classes/DataUtilities.m b/media/ios/Classes/DataUtilities.m new file mode 100644 index 000000000..e8b98c13c --- /dev/null +++ b/media/ios/Classes/DataUtilities.m @@ -0,0 +1,39 @@ +// +// DataUtilities.m +// NewsBlur +// +// Created by Roy Yang on 7/20/12. +// Copyright (c) 2012 NewsBlur. All rights reserved. +// + +#import "DataUtilities.h" +#import "NewsBlurAppDelegate.h" + +@implementation DataUtilities + ++ (NSArray *)updateUserProfiles:(NSArray *)userProfiles withNewUserProfiles:(NSArray *)newUserProfiles { + + NSMutableArray *updatedUserProfiles = [userProfiles mutableCopy]; + + for (int i = 0; i < newUserProfiles.count; i++) { + BOOL isInUserProfiles = NO; + NSDictionary *newUser = [newUserProfiles objectAtIndex:i]; + NSString *newUserIdStr = [NSString stringWithFormat:@"%@", [newUser objectForKey:@"user_id"]]; + + for (int j = 0; j < userProfiles.count; j++) { + NSDictionary *user = [userProfiles objectAtIndex:i]; + NSString *userIdStr = [NSString stringWithFormat:@"%@", [user objectForKey:@"user_id"]]; + if ([newUserIdStr isEqualToString:userIdStr]) { + isInUserProfiles = YES; + break; + } + } + + if (!isInUserProfiles) { + [updatedUserProfiles addObject:newUser]; + } + } + return updatedUserProfiles; +} + +@end diff --git a/media/ios/Classes/FeedDetailViewController.m b/media/ios/Classes/FeedDetailViewController.m index fdf0f77c7..ac6e332d4 100644 --- a/media/ios/Classes/FeedDetailViewController.m +++ b/media/ios/Classes/FeedDetailViewController.m @@ -1138,6 +1138,12 @@ - (void)loadFaviconsFromActiveFeed { NSArray * keys = [appDelegate.dictActiveFeeds allKeys]; + + if (![keys count]) { + // if no new favicons, return + return; + } + NSString *feedIdsQuery = [NSString stringWithFormat:@"?feed_ids=%@", [[keys valueForKey:@"description"] componentsJoinedByString:@"&feed_ids="]]; NSString *urlString = [NSString stringWithFormat:@"http://%@/reader/favicons%@", diff --git a/media/ios/Classes/NewsBlurAppDelegate.h b/media/ios/Classes/NewsBlurAppDelegate.h index 0d5cbeb75..7a7ca7339 100644 --- a/media/ios/Classes/NewsBlurAppDelegate.h +++ b/media/ios/Classes/NewsBlurAppDelegate.h @@ -199,7 +199,7 @@ - (void)hideStoryDetailView; - (void)changeActiveFeedDetailRow; - (void)dragFeedDetailView:(float)y; -- (void)showShareView:(NSString *)userId setUsername:(NSString *)username; +- (void)showShareView:(NSString *)type setUserId:(NSString *)userId setUsername:(NSString *)username setCommentIndex:(NSString *)commentIndex; - (void)hideShareView:(BOOL)resetComment; - (void)refreshComments; - (void)resetShareComments; diff --git a/media/ios/Classes/NewsBlurAppDelegate.m b/media/ios/Classes/NewsBlurAppDelegate.m index ed97fbc83..90c452a69 100644 --- a/media/ios/Classes/NewsBlurAppDelegate.m +++ b/media/ios/Classes/NewsBlurAppDelegate.m @@ -253,13 +253,17 @@ self.feedDashboardViewController.storyLabel.hidden = NO; } -- (void)showShareView:(NSString *)userId - setUsername:(NSString *)username { +- (void)showShareView:(NSString *)type + setUserId:(NSString *)userId + setUsername:(NSString *)username + setCommentIndex:(NSString *)commentIndex { self.isShowingShare = YES; if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { // add shareViewController to storyDetail [self.storyDetailViewController.view addSubview:self.shareViewController.view]; - [self.shareViewController setSiteInfo:userId setUsername:username]; + [self.shareViewController setSiteInfo:type setUserId:userId setUsername:username setCommentIndex:commentIndex]; + + self.shareViewController.view.frame = CGRectMake(0, self.storyDetailViewController.view.frame.size.height, self.storyDetailViewController.view.frame.size.width, @@ -288,7 +292,7 @@ } else { ShareViewController *shareView = [[ShareViewController alloc] init]; self.shareViewController = shareView; - [self.shareViewController setSiteInfo:userId setUsername:username]; + [self.shareViewController setSiteInfo:type setUserId:userId setUsername:username setCommentIndex:commentIndex]; [self.navigationController presentModalViewController:self.shareViewController animated:YES]; } } diff --git a/media/ios/Classes/NewsBlurViewController.m b/media/ios/Classes/NewsBlurViewController.m index 2851aa160..7a0e61743 100644 --- a/media/ios/Classes/NewsBlurViewController.m +++ b/media/ios/Classes/NewsBlurViewController.m @@ -1044,13 +1044,12 @@ } if ([folderName isEqualToString:@""]){ - NSLog(@"feedLocations count is %i: ", [feedLocations count]); +// NSLog(@"feedLocations count is %i: ", [feedLocations count]); } // NSLog(@"feedLocations %@", feedLocations); [self.activeFeedLocations setObject:feedLocations forKey:folderName]; } - NSLog(@"second here"); // NSLog(@"Active feed locations %@", self.activeFeedLocations); } diff --git a/media/ios/Classes/ShareViewController.h b/media/ios/Classes/ShareViewController.h index 5f16bc0eb..81f052cb1 100644 --- a/media/ios/Classes/ShareViewController.h +++ b/media/ios/Classes/ShareViewController.h @@ -20,7 +20,7 @@ @property ( nonatomic) IBOutlet UIBarButtonItem *submitButton; @property ( nonatomic) IBOutlet UIBarButtonItem *toolbarTitle; -- (void)setSiteInfo:(NSString *)userId setUsername:(NSString *)username; +- (void)setSiteInfo:(NSString *)type setUserId:(NSString *)userId setUsername:(NSString *)username setCommentIndex:(NSString *)commentIndex; - (void)clearComments; - (IBAction)doCancelButton:(id)sender; - (IBAction)doToggleButton:(id)sender; diff --git a/media/ios/Classes/ShareViewController.m b/media/ios/Classes/ShareViewController.m index baf886fa4..5e43fccd8 100644 --- a/media/ios/Classes/ShareViewController.m +++ b/media/ios/Classes/ShareViewController.m @@ -11,6 +11,7 @@ #import "StoryDetailViewController.h" #import #import "Utilities.h" +#import "DataUtilities.h" #import "JSON.h" #import "ASIHTTPRequest.h" @@ -107,14 +108,41 @@ [userPreferences synchronize]; } -- (void)setSiteInfo:(NSString *)userId setUsername:(NSString *)username { - if (userId) { +- (void)setSiteInfo:(NSString *)type setUserId:(NSString *)userId setUsername:(NSString *)username setCommentIndex:(NSString *)commentIndex { + + if ([type isEqualToString: @"edit-reply"]) { + [submitButton setTitle:@"Save"]; + facebookButton.hidden = YES; + twitterButton.hidden = YES; + [toolbarTitle setTitle:[NSString stringWithFormat:@"Edit Your Reply"]]; + [submitButton setAction:(@selector(doReplyToComment:))]; + + // get old comment + NSArray *replies = [appDelegate.activeComment objectForKey:@"replies"]; + int commentIdx = [commentIndex intValue]; + self.commentField.text = [[replies objectAtIndex:commentIdx] objectForKey:@"comments"]; + } else if ([type isEqualToString: @"reply"]) { [submitButton setTitle:@"Reply"]; facebookButton.hidden = YES; twitterButton.hidden = YES; [toolbarTitle setTitle:[NSString stringWithFormat:@"Reply to %@", username]]; [submitButton setAction:(@selector(doReplyToComment:))]; - } else { + } else if ([type isEqualToString: @"edit-share"]) { + facebookButton.hidden = NO; + twitterButton.hidden = NO; + + // get old comment + self.commentField.text = [appDelegate.activeComment objectForKey:@"comments"]; + + if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { + [toolbarTitle setTitle:@"Edit Your Comment"]; + [submitButton setTitle:@"Save"]; + } else { + [toolbarTitle setTitle:@"Edit"]; + [submitButton setTitle:@"Save"]; + } + [submitButton setAction:(@selector(doShareThisStory:))]; + } else if ([type isEqualToString: @"share"]) { facebookButton.hidden = NO; twitterButton.hidden = NO; if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { @@ -123,7 +151,6 @@ } else { [toolbarTitle setTitle:@"Post"]; [submitButton setTitle:@"Share"]; - NSLog(@"set title"); } [submitButton setAction:(@selector(doShareThisStory:))]; } @@ -183,7 +210,7 @@ } - (void)finishAddReply:(ASIHTTPRequest *)request { - NSLog(@"%@", [request responseString]); + NSLog(@"/n/n/n%@/n/n/n/", [request responseString]);; NSLog(@"Successfully added."); NSString *responseString = [request responseString]; NSDictionary *results = [[NSDictionary alloc] @@ -191,6 +218,12 @@ // add the comment into the activeStory dictionary NSDictionary *comment = [results objectForKey:@"comment"]; + NSArray *userProfiles = [results objectForKey:@"user_profiles"]; + + appDelegate.activeFeedUserProfiles = [DataUtilities + updateUserProfiles:appDelegate.activeFeedUserProfiles + withNewUserProfiles:userProfiles]; + NSString *commentUserId = [NSString stringWithFormat:@"%@", [comment objectForKey:@"user_id"]]; BOOL foundComment = NO; @@ -223,6 +256,8 @@ [newPublicComments addObject:[publicComments objectAtIndex:i]]; } } + [newActiveStory setValue:[NSArray arrayWithArray:publicComments] forKey:@"public_comments"]; + } else { [newActiveStory setValue:[NSArray arrayWithArray:newFriendsComments] forKey:@"friend_comments"]; } @@ -231,9 +266,7 @@ } - (void)finishAddComment:(ASIHTTPRequest *)request { - NSLog(@"%@", [request responseString]); - NSLog(@"Successfully added."); - + NSLog(@"/n/n/n%@/n/n/n/", [request responseString]); NSString *responseString = [request responseString]; NSDictionary *results = [[NSDictionary alloc] diff --git a/media/ios/Classes/StoryDetailViewController.h b/media/ios/Classes/StoryDetailViewController.h index a09d0a820..aaa8f545c 100644 --- a/media/ios/Classes/StoryDetailViewController.h +++ b/media/ios/Classes/StoryDetailViewController.h @@ -66,7 +66,7 @@ - (void)changeFontSize:(NSString *)fontSize; - (NSString *)getComments:(NSString *)type; - (NSString *)getComment:(NSDictionary *)commentDict; -- (NSString *)getReplies:(NSArray *)replies; +- (NSString *)getReplies:(NSArray *)replies forUserId:(NSString *)commentUserId; - (NSString *)getAvatars:(BOOL)areFriends; - (NSDictionary *)getUser:(int)user_id; diff --git a/media/ios/Classes/StoryDetailViewController.m b/media/ios/Classes/StoryDetailViewController.m index a714fbf1f..d66ae0bf7 100644 --- a/media/ios/Classes/StoryDetailViewController.m +++ b/media/ios/Classes/StoryDetailViewController.m @@ -284,7 +284,7 @@ userEditButton = [NSString stringWithFormat:@ "
" "
" - "edit" + "edit" "
" "
" ]; @@ -331,22 +331,35 @@ [commentDict objectForKey:@"user_id"], [user objectForKey:@"username"], [commentDict objectForKey:@"comments"], - [self getReplies:[commentDict objectForKey:@"replies"]]]; + [self getReplies:[commentDict objectForKey:@"replies"] forUserId:[commentDict objectForKey:@"user_id"]]]; return comment; } -- (NSString *)getReplies:(NSArray *)replies { +- (NSString *)getReplies:(NSArray *)replies forUserId:(NSString *)commentUserId { NSString *repliesString = @""; if (replies.count > 0) { repliesString = [repliesString stringByAppendingString:@"
"]; for (int i = 0; i < replies.count; i++) { - NSDictionary *reply_dict = [replies objectAtIndex:i]; - NSDictionary *user = [self getUser:[[reply_dict objectForKey:@"user_id"] intValue]]; -// NSString *editStr = [NSString stringWithFormat:@ -// "
" -// "
edit
" -// "
"]; + NSDictionary *replyDict = [replies objectAtIndex:i]; + NSDictionary *user = [self getUser:[[replyDict objectForKey:@"user_id"] intValue]]; + + NSString *userEditButton = @""; + NSString *replyUserId = [NSString stringWithFormat:@"%@", [replyDict objectForKey:@"user_id"]]; + NSString *currentUserId = [NSString stringWithFormat:@"%@", [appDelegate.dictUserProfile objectForKey:@"user_id"]]; + + if ([replyUserId isEqualToString:currentUserId]) { + userEditButton = [NSString stringWithFormat:@ + "
" + "
" + "edit" + "
" + "
", + commentUserId, + replyUserId, + i // comment number in array + ]; + } NSString *reply = [NSString stringWithFormat:@ "
" @@ -355,13 +368,15 @@ " " "
%@
" "
%@ ago
" + " %@" //User Edit Button>" "
%@
" "
", [user objectForKey:@"user_id"], [user objectForKey:@"photo_url"], [user objectForKey:@"username"], - [reply_dict objectForKey:@"publish_date"], - [reply_dict objectForKey:@"comments"]]; + [replyDict objectForKey:@"publish_date"], + userEditButton, + [replyDict objectForKey:@"comments"]]; repliesString = [repliesString stringByAppendingString:reply]; } repliesString = [repliesString stringByAppendingString:@"
"]; @@ -576,7 +591,9 @@ shouldStartLoadWithRequest:(NSURLRequest *)request // the pathComponents do not work correctly unless it is a correctly formed url // Is there a better way? Someone show me the light if ([[url host] isEqualToString: @"ios.newsblur.com"]){ - if ([action isEqualToString:@"reply"]) { + if ([action isEqualToString:@"reply"] || + [action isEqualToString:@"edit-reply"] || + [action isEqualToString:@"edit-share"]) { appDelegate.activeComment = nil; // search for the comment from friends comments NSArray *friendComments = [appDelegate.activeStory objectForKey:@"friend_comments"]; @@ -600,11 +617,29 @@ shouldStartLoadWithRequest:(NSURLRequest *)request } } } - [appDelegate showShareView:[NSString stringWithFormat:@"%@", [urlComponents objectAtIndex:2]] - setUsername:[NSString stringWithFormat:@"%@", [urlComponents objectAtIndex:3]]]; - return NO; + + if ([action isEqualToString:@"reply"]) { + [appDelegate showShareView:@"reply" + setUserId:[NSString stringWithFormat:@"%@", [urlComponents objectAtIndex:2]] + setUsername:[NSString stringWithFormat:@"%@", [urlComponents objectAtIndex:3]] + setCommentIndex:nil]; + } else if ([action isEqualToString:@"edit-reply"]) { + [appDelegate showShareView:@"edit-reply" + setUserId:[NSString stringWithFormat:@"%@", [urlComponents objectAtIndex:2]] + setUsername:nil + setCommentIndex:[NSString stringWithFormat:@"%@", [urlComponents objectAtIndex:4]]]; + } else if ([action isEqualToString:@"edit-share"]) { + [appDelegate showShareView:@"edit-share" + setUserId:nil + setUsername:nil + setCommentIndex:[NSString stringWithFormat:@"%@", [urlComponents objectAtIndex:3]]]; + } + return NO; } else if ([action isEqualToString:@"share"]) { - [appDelegate showShareView:nil setUsername:nil]; + [appDelegate showShareView:@"share" + setUserId:nil + setUsername:nil + setCommentIndex:nil]; return NO; } else if ([action isEqualToString:@"show-profile"]) { appDelegate.activeUserProfileId = [NSString stringWithFormat:@"%@", [urlComponents objectAtIndex:2]]; @@ -768,10 +803,13 @@ shouldStartLoadWithRequest:(NSURLRequest *)request } - (void)refreshComments { - NSString *friendsCommentString = [self getComments:@"friends"]; + NSString *commentString = [self getComments:@"friends"]; NSString *jsString = [[NSString alloc] initWithFormat:@ - "document.getElementById('NB-comments-wrapper').innerHTML = '%@';", - friendsCommentString]; + //"document.getElementById('NB-comments-wrapper').innerHTML = '%@';", + + + "document.write(%@)", + commentString]; [self.webView stringByEvaluatingJavaScriptFromString:jsString]; } diff --git a/media/ios/NewsBlur-iPhone-Info.plist b/media/ios/NewsBlur-iPhone-Info.plist index f8af28875..a97de72c4 100644 --- a/media/ios/NewsBlur-iPhone-Info.plist +++ b/media/ios/NewsBlur-iPhone-Info.plist @@ -49,11 +49,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.3 + 1.5 CFBundleSignature ???? CFBundleVersion - 1.3 + 1.5 LSRequiresIPhoneOS NSMainNibFile @@ -62,6 +62,8 @@ MainWindow~ipad UIPrerenderedIcon + UIStatusBarStyle + UIStatusBarStyleBlackOpaque UISupportedInterfaceOrientations UIInterfaceOrientationPortrait @@ -76,7 +78,5 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIStatusBarStyle - UIStatusBarStyleBlackOpaque diff --git a/media/ios/NewsBlur.xcodeproj/project.pbxproj b/media/ios/NewsBlur.xcodeproj/project.pbxproj index e93a44fdf..8ccdcb576 100755 --- a/media/ios/NewsBlur.xcodeproj/project.pbxproj +++ b/media/ios/NewsBlur.xcodeproj/project.pbxproj @@ -193,6 +193,7 @@ 43C95C48158BEC450086C69B /* GoogleReaderViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 43C95C46158BEC440086C69B /* GoogleReaderViewController.m */; }; 43C95C49158BEC450086C69B /* GoogleReaderViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 43C95C47158BEC440086C69B /* GoogleReaderViewController.xib */; }; 43C95C4B158BF8810086C69B /* google_reader_selected_background.png in Resources */ = {isa = PBXBuildFile; fileRef = 43C95C4A158BF8810086C69B /* google_reader_selected_background.png */; }; + 43D818A315B940C200733444 /* DataUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 43D818A215B940C200733444 /* DataUtilities.m */; }; 43E8856015951F930032022E /* reader.css in Resources */ = {isa = PBXBuildFile; fileRef = 43E8855F15951F930032022E /* reader.css */; }; 43F44B1C159D8DBC00F48F8A /* FeedTableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F44B1B159D8D7200F48F8A /* FeedTableCell.m */; }; 43F6A79915B0C57F0092EE91 /* flag_orange.png in Resources */ = {isa = PBXBuildFile; fileRef = 43F6A79815B0C57F0092EE91 /* flag_orange.png */; }; @@ -525,6 +526,8 @@ 43D045261565BC150085F811 /* AddSiteViewController~ipad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "AddSiteViewController~ipad.xib"; path = "Resources-iPad/Classes/AddSiteViewController~ipad.xib"; sourceTree = ""; }; 43D045271565BC150085F811 /* AddSiteAutocompleteCell~ipad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "AddSiteAutocompleteCell~ipad.xib"; path = "Resources-iPad/Classes/AddSiteAutocompleteCell~ipad.xib"; sourceTree = SOURCE_ROOT; }; 43D045281565BC150085F811 /* MoveSiteViewController~ipad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "MoveSiteViewController~ipad.xib"; path = "Resources-iPad/Classes/MoveSiteViewController~ipad.xib"; sourceTree = ""; }; + 43D818A115B940C200733444 /* DataUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataUtilities.h; sourceTree = ""; }; + 43D818A215B940C200733444 /* DataUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DataUtilities.m; sourceTree = ""; }; 43E8855F15951F930032022E /* reader.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; name = reader.css; path = ../reader.css; sourceTree = ""; }; 43F44B1A159D8D7200F48F8A /* FeedTableCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FeedTableCell.h; sourceTree = ""; }; 43F44B1B159D8D7200F48F8A /* FeedTableCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FeedTableCell.m; sourceTree = ""; }; @@ -754,6 +757,7 @@ 080E96DDFE201D6D7F000001 /* Classes */ = { isa = PBXGroup; children = ( + 43D8189F15B9404D00733444 /* Models */, 437F974715ACA0C50007136B /* Dashboard */, 431B857415A1324200DCE497 /* Story */, 431B857315A131C300DCE497 /* Feeds */, @@ -764,6 +768,8 @@ FFD1D7301459B63500E46F89 /* BaseViewController.m */, FFE5322D144C8AC300ACFDE0 /* Utilities.h */, FFE5322E144C8AC300ACFDE0 /* Utilities.m */, + 43D818A115B940C200733444 /* DataUtilities.h */, + 43D818A215B940C200733444 /* DataUtilities.m */, ); path = Classes; sourceTree = ""; @@ -1176,6 +1182,13 @@ name = "Resources-iPad"; sourceTree = ""; }; + 43D8189F15B9404D00733444 /* Models */ = { + isa = PBXGroup; + children = ( + ); + name = Models; + sourceTree = ""; + }; 78095E23128EF30C00230C8E /* ASI */ = { isa = PBXGroup; children = ( @@ -1911,6 +1924,7 @@ 43A3914B15B73A7B0074B212 /* AFURLConnectionOperation.m in Sources */, 43A3914C15B73A7B0074B212 /* AFXMLRequestOperation.m in Sources */, 43A3914D15B73A7B0074B212 /* UIImageView+AFNetworking.m in Sources */, + 43D818A315B940C200733444 /* DataUtilities.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/media/ios/NewsBlur_Prefix.pch b/media/ios/NewsBlur_Prefix.pch index 8b1512db1..044e5b3cb 100644 --- a/media/ios/NewsBlur_Prefix.pch +++ b/media/ios/NewsBlur_Prefix.pch @@ -12,10 +12,10 @@ green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \ blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0] - #define BACKGROUND_REFRESH_SECONDS -5 -// #define BACKGROUND_REFRESH_SECONDS -10*60 +// f#define BACKGROUND_REFRESH_SECONDS -5 + #define BACKGROUND_REFRESH_SECONDS -10*60 - #define NEWSBLUR_URL [NSString stringWithFormat:@"nb.local.host:8000"] + #define NEWSBLUR_URL [NSString stringWithFormat:@"nb.local.host"] // #define NEWSBLUR_URL [NSString stringWithFormat:@"dev.newsblur.com"] #define NEWSBLUR_ORANGE 0xAE5D15