Failing marking a story as read in ios now shows an error.

This commit is contained in:
Samuel Clay 2012-11-16 15:24:04 -08:00
parent 101fbdbda6
commit ca67cbc00c
3 changed files with 11 additions and 7 deletions

View file

@ -89,6 +89,7 @@ UIScrollViewDelegate> {
- (void)subscribeToBlurblog;
- (void)finishSubscribeToBlurblog:(ASIHTTPRequest *)request;
- (void)requestFailed:(ASIHTTPRequest *)request;
- (void)requestFailedMarkAsRead:(ASIHTTPRequest *)request;
- (void)setActiveStory;
- (IBAction)toggleFontSize:(id)sender;
- (void)setFontStyle:(NSString *)fontStyle;

View file

@ -1186,7 +1186,7 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
}
[request setDidFinishSelector:@selector(finishMarkAsRead:)];
[request setDidFailSelector:@selector(requestFailed:)];
[request setDidFailSelector:@selector(requestFailedMarkAsRead:)];
[request setDelegate:self];
[request startAsynchronous];
}
@ -1268,11 +1268,14 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
[self informError:error];
}
- (void)requestFailedMarkAsRead:(ASIHTTPRequest *)request {
[self informError:@"Failed marking as read"];
}
- (void)finishMarkAsRead:(ASIHTTPRequest *)request {
// NSString *responseString = [request responseString];
// NSDictionary *results = [[NSDictionary alloc]
// initWithDictionary:[responseString JSONValue]];
// NSLog(@"results in mark as read is %@", results);
if ([request responseStatusCode] != 200) {
[self requestFailedMarkAsRead:request];
}
}
- (void)openSendToDialog {

View file

@ -15,8 +15,8 @@
// #define BACKGROUND_REFRESH_SECONDS -5
#define BACKGROUND_REFRESH_SECONDS -10*60
// #define NEWSBLUR_URL [NSString stringWithFormat:@"nb.local.com"]
#define NEWSBLUR_URL [NSString stringWithFormat:@"www.newsblur.com"]
#define NEWSBLUR_URL [NSString stringWithFormat:@"nb.local.com"]
// #define NEWSBLUR_URL [NSString stringWithFormat:@"www.newsblur.com"]
#define NEWSBLUR_LINK_COLOR 0x405BA8
#define NEWSBLUR_HIGHLIGHT_COLOR 0xd2e6fd