mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Handling canceled feed detail loads.
This commit is contained in:
parent
b67a84530b
commit
a8c7c8cfaa
4 changed files with 14 additions and 7 deletions
|
@ -121,7 +121,7 @@
|
|||
- (void)viewWillAppear:(BOOL)animated {
|
||||
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
|
||||
[self setUserAvatarLayout:orientation];
|
||||
|
||||
[self cancelRequests];
|
||||
self.finishedAnimatingIn = NO;
|
||||
self.pageFinished = NO;
|
||||
[MBProgressHUD hideHUDForView:self.view animated:YES];
|
||||
|
@ -354,7 +354,10 @@
|
|||
[request setDefaultResponseEncoding:NSUTF8StringEncoding];
|
||||
[request setFailedBlock:^(void) {
|
||||
NSLog(@"in failed block %@", request);
|
||||
if (self.feedPage == 1) {
|
||||
if (request.isCancelled) {
|
||||
NSLog(@"Cancelled");
|
||||
return;
|
||||
} else if (self.feedPage == 1) {
|
||||
self.isOffline = YES;
|
||||
[self loadOfflineStories];
|
||||
[self showOfflineNotifier];
|
||||
|
@ -373,6 +376,7 @@
|
|||
[request setTimeOutSeconds:30];
|
||||
[request setTag:[[[appDelegate activeFeed] objectForKey:@"id"] intValue]];
|
||||
[request startAsynchronous];
|
||||
[requests addObject:request];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,8 @@
|
|||
BOOL inFeedDetail;
|
||||
BOOL inStoryDetail;
|
||||
BOOL inFindingStoryMode;
|
||||
BOOL hashQueuedReadStories;
|
||||
BOOL feedDetailLoaded;
|
||||
BOOL hasQueuedReadStories;
|
||||
NSString *tryFeedStoryId;
|
||||
NSDictionary * activeFeed;
|
||||
NSMutableDictionary * activeClassifiers;
|
||||
|
@ -185,6 +186,7 @@
|
|||
@property (nonatomic, readwrite) BOOL isSocialRiverView;
|
||||
@property (nonatomic, readwrite) BOOL isTryFeedView;
|
||||
@property (nonatomic, readwrite) BOOL inFindingStoryMode;
|
||||
@property (nonatomic, readwrite) BOOL feedDetailLoaded;
|
||||
@property (nonatomic) NSString *tryFeedStoryId;
|
||||
@property (nonatomic) NSString *tryFeedCategory;
|
||||
@property (nonatomic, readwrite) BOOL popoverHasFeedView;
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
@synthesize isTryFeedView;
|
||||
|
||||
@synthesize inFindingStoryMode;
|
||||
@synthesize feedDetailLoaded;
|
||||
@synthesize tryFeedStoryId;
|
||||
@synthesize tryFeedCategory;
|
||||
@synthesize popoverHasFeedView;
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
// #define BACKGROUND_REFRESH_SECONDS -5
|
||||
#define BACKGROUND_REFRESH_SECONDS -10*60
|
||||
|
||||
// #define NEWSBLUR_URL [NSString stringWithFormat:@"http://nb.local.com"]
|
||||
// #define NEWSBLUR_HOST [NSString stringWithFormat:@"nb.local.com"]
|
||||
#define NEWSBLUR_URL [NSString stringWithFormat:@"https://www.newsblur.com"]
|
||||
#define NEWSBLUR_HOST [NSString stringWithFormat:@"www.newsblur.com"]
|
||||
#define NEWSBLUR_URL [NSString stringWithFormat:@"http://nb.local.com"]
|
||||
#define NEWSBLUR_HOST [NSString stringWithFormat:@"nb.local.com"]
|
||||
// #define NEWSBLUR_URL [NSString stringWithFormat:@"https://www.newsblur.com"]
|
||||
// #define NEWSBLUR_HOST [NSString stringWithFormat:@"www.newsblur.com"]
|
||||
|
||||
#define NEWSBLUR_LINK_COLOR 0x405BA8
|
||||
#define NEWSBLUR_HIGHLIGHT_COLOR 0xd2e6fd
|
||||
|
|
Loading…
Add table
Reference in a new issue