2010-06-17 13:10:45 -04:00
|
|
|
//
|
|
|
|
// NewsBlurAppDelegate.h
|
|
|
|
// NewsBlur
|
|
|
|
//
|
|
|
|
// Created by Samuel Clay on 6/16/10.
|
2010-06-21 17:17:26 -04:00
|
|
|
// Copyright NewsBlur 2010. All rights reserved.
|
2010-06-17 13:10:45 -04:00
|
|
|
//
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
|
|
|
|
@class NewsBlurViewController;
|
2010-06-21 17:17:26 -04:00
|
|
|
@class FeedDetailViewController;
|
2010-06-25 18:36:01 -04:00
|
|
|
@class StoryDetailViewController;
|
2010-10-31 23:02:13 -04:00
|
|
|
@class LoginViewController;
|
2011-10-04 18:01:35 -07:00
|
|
|
@class AddViewController;
|
2010-11-13 18:32:43 -05:00
|
|
|
@class OriginalStoryViewController;
|
2010-06-17 13:10:45 -04:00
|
|
|
|
|
|
|
@interface NewsBlurAppDelegate : NSObject <UIApplicationDelegate> {
|
|
|
|
UIWindow *window;
|
2010-06-21 17:17:26 -04:00
|
|
|
UINavigationController *navigationController;
|
|
|
|
NewsBlurViewController *feedsViewController;
|
2010-06-24 12:53:50 -04:00
|
|
|
FeedDetailViewController *feedDetailViewController;
|
2010-06-25 18:36:01 -04:00
|
|
|
StoryDetailViewController *storyDetailViewController;
|
2010-10-31 23:02:13 -04:00
|
|
|
LoginViewController *loginViewController;
|
2011-10-04 18:01:35 -07:00
|
|
|
AddViewController *addViewController;
|
2010-11-13 18:32:43 -05:00
|
|
|
OriginalStoryViewController *originalStoryViewController;
|
2010-06-25 18:36:01 -04:00
|
|
|
|
2010-11-13 18:32:43 -05:00
|
|
|
NSString * activeUsername;
|
2011-10-25 09:28:05 -07:00
|
|
|
BOOL isRiverView;
|
2010-06-25 18:36:01 -04:00
|
|
|
NSDictionary * activeFeed;
|
2011-10-20 09:32:39 -07:00
|
|
|
NSString * activeFolder;
|
2011-10-26 08:40:31 -07:00
|
|
|
NSArray * activeFolderFeeds;
|
2010-06-25 18:36:01 -04:00
|
|
|
NSArray * activeFeedStories;
|
2011-07-29 21:27:37 -07:00
|
|
|
NSMutableArray * activeFeedStoryLocations;
|
2011-08-08 09:58:15 -07:00
|
|
|
NSMutableArray * activeFeedStoryLocationIds;
|
2010-06-25 18:36:01 -04:00
|
|
|
NSDictionary * activeStory;
|
2010-11-13 18:32:43 -05:00
|
|
|
NSURL * activeOriginalStoryURL;
|
2011-07-24 20:34:54 -07:00
|
|
|
int storyCount;
|
2011-08-09 17:58:43 -07:00
|
|
|
int originalStoryCount;
|
2011-07-29 09:06:17 -07:00
|
|
|
NSInteger selectedIntelligence;
|
2011-07-24 21:47:58 -07:00
|
|
|
NSMutableArray * recentlyReadStories;
|
2011-08-22 18:25:33 -07:00
|
|
|
NSMutableArray * readStories;
|
2011-10-04 18:01:35 -07:00
|
|
|
|
|
|
|
NSDictionary * dictFolders;
|
|
|
|
NSDictionary * dictFeeds;
|
|
|
|
NSMutableArray * dictFoldersArray;
|
2010-06-17 13:10:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
@property (nonatomic, retain) IBOutlet UIWindow *window;
|
2010-06-25 18:36:01 -04:00
|
|
|
@property (nonatomic, readonly, retain) IBOutlet UINavigationController *navigationController;
|
2010-06-21 17:17:26 -04:00
|
|
|
@property (nonatomic, retain) IBOutlet NewsBlurViewController *feedsViewController;
|
2010-06-24 12:53:50 -04:00
|
|
|
@property (nonatomic, retain) IBOutlet FeedDetailViewController *feedDetailViewController;
|
2010-06-25 18:36:01 -04:00
|
|
|
@property (nonatomic, retain) IBOutlet StoryDetailViewController *storyDetailViewController;
|
2010-10-31 23:02:13 -04:00
|
|
|
@property (nonatomic, retain) IBOutlet LoginViewController *loginViewController;
|
2011-10-04 18:01:35 -07:00
|
|
|
@property (nonatomic, retain) IBOutlet AddViewController *addViewController;
|
2010-11-13 18:32:43 -05:00
|
|
|
@property (nonatomic, retain) IBOutlet OriginalStoryViewController *originalStoryViewController;
|
2010-11-13 13:42:20 -05:00
|
|
|
|
2010-11-13 18:32:43 -05:00
|
|
|
@property (readwrite, retain) NSString * activeUsername;
|
2011-10-25 09:28:05 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL isRiverView;
|
2010-06-25 18:36:01 -04:00
|
|
|
@property (readwrite, retain) NSDictionary * activeFeed;
|
2011-10-20 09:32:39 -07:00
|
|
|
@property (readwrite, retain) NSString * activeFolder;
|
2011-10-26 08:40:31 -07:00
|
|
|
@property (readwrite, retain) NSArray * activeFolderFeeds;
|
2010-06-25 18:36:01 -04:00
|
|
|
@property (readwrite, retain) NSArray * activeFeedStories;
|
2011-07-29 21:27:37 -07:00
|
|
|
@property (readwrite, retain) NSMutableArray * activeFeedStoryLocations;
|
2011-08-08 09:58:15 -07:00
|
|
|
@property (readwrite, retain) NSMutableArray * activeFeedStoryLocationIds;
|
2010-06-25 18:36:01 -04:00
|
|
|
@property (readwrite, retain) NSDictionary * activeStory;
|
2010-11-13 18:32:43 -05:00
|
|
|
@property (readwrite, retain) NSURL * activeOriginalStoryURL;
|
2011-07-24 20:34:54 -07:00
|
|
|
@property (readwrite) int storyCount;
|
2011-08-09 17:58:43 -07:00
|
|
|
@property (readwrite) int originalStoryCount;
|
2011-07-29 09:06:17 -07:00
|
|
|
@property (readwrite) NSInteger selectedIntelligence;
|
2011-07-24 21:47:58 -07:00
|
|
|
@property (readwrite, retain) NSMutableArray * recentlyReadStories;
|
2011-08-22 18:25:33 -07:00
|
|
|
@property (readwrite, retain) NSMutableArray * readStories;
|
2010-06-25 18:36:01 -04:00
|
|
|
|
2011-10-04 18:01:35 -07:00
|
|
|
@property (nonatomic, retain) NSDictionary *dictFolders;
|
|
|
|
@property (nonatomic, retain) NSDictionary *dictFeeds;
|
|
|
|
@property (nonatomic, retain) NSMutableArray *dictFoldersArray;
|
|
|
|
|
2010-11-11 23:48:27 -05:00
|
|
|
- (void)showLogin;
|
2011-10-04 18:01:35 -07:00
|
|
|
- (void)showAdd;
|
2010-06-25 18:36:01 -04:00
|
|
|
- (void)loadFeedDetailView;
|
2011-10-26 08:40:31 -07:00
|
|
|
- (void)loadRiverFeedDetailView;
|
2010-06-25 18:36:01 -04:00
|
|
|
- (void)loadStoryDetailView;
|
2010-11-11 20:05:53 -05:00
|
|
|
- (void)reloadFeedsView;
|
2010-06-21 17:17:26 -04:00
|
|
|
- (void)hideNavigationBar:(BOOL)animated;
|
|
|
|
- (void)showNavigationBar:(BOOL)animated;
|
2010-11-11 23:48:27 -05:00
|
|
|
- (void)setTitle:(NSString *)title;
|
2010-11-13 18:32:43 -05:00
|
|
|
- (void)showOriginalStory:(NSURL *)url;
|
|
|
|
- (void)closeOriginalStory;
|
2011-08-22 18:25:33 -07:00
|
|
|
|
2011-06-15 11:21:55 -04:00
|
|
|
- (int)indexOfNextStory;
|
|
|
|
- (int)indexOfPreviousStory;
|
|
|
|
- (int)indexOfActiveStory;
|
2011-08-08 09:58:15 -07:00
|
|
|
- (int)locationOfActiveStory;
|
2011-08-22 18:25:33 -07:00
|
|
|
- (void)pushReadStory:(id)storyId;
|
|
|
|
- (id)popReadStory;
|
|
|
|
- (int)locationOfStoryId:(id)storyId;
|
|
|
|
|
2011-07-24 16:52:24 -07:00
|
|
|
- (void)setStories:(NSArray *)activeFeedStoriesValue;
|
|
|
|
- (void)addStories:(NSArray *)stories;
|
2011-07-26 08:37:10 -07:00
|
|
|
- (int)unreadCount;
|
2011-08-09 17:58:43 -07:00
|
|
|
- (int)visibleUnreadCount;
|
2011-07-24 20:34:54 -07:00
|
|
|
- (void)markActiveStoryRead;
|
2011-07-24 22:23:38 -07:00
|
|
|
- (void)markActiveFeedAllRead;
|
2011-07-29 21:27:37 -07:00
|
|
|
- (void)calculateStoryLocations;
|
2010-11-22 10:44:52 -05:00
|
|
|
+ (int)computeStoryScore:(NSDictionary *)intelligence;
|
2011-08-18 09:56:52 -07:00
|
|
|
+ (void)informError:(NSError *)error;
|
2010-06-17 13:10:45 -04:00
|
|
|
|
|
|
|
@end
|
|
|
|
|