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>
|
2011-10-27 09:44:58 -07:00
|
|
|
#import "BaseViewController.h"
|
2013-06-14 19:21:30 -07:00
|
|
|
#import "FMDatabaseQueue.h"
|
2010-06-17 13:10:45 -04:00
|
|
|
|
2012-06-20 08:42:19 -07:00
|
|
|
#define FEED_DETAIL_VIEW_TAG 1000001
|
|
|
|
#define STORY_DETAIL_VIEW_TAG 1000002
|
|
|
|
#define FEED_TITLE_GRADIENT_TAG 100003
|
2012-06-20 09:32:55 -07:00
|
|
|
#define FEED_DASHBOARD_VIEW_TAG 100004
|
2012-07-03 11:15:09 -07:00
|
|
|
#define SHARE_MODAL_HEIGHT 120
|
2012-07-23 15:27:20 -07:00
|
|
|
#define STORY_TITLES_HEIGHT 240
|
2012-07-18 13:56:09 -07:00
|
|
|
#define DASHBOARD_TITLE @"NewsBlur"
|
2012-06-20 08:42:19 -07:00
|
|
|
|
2012-06-19 11:48:51 -07:00
|
|
|
@class NewsBlurViewController;
|
2012-07-10 12:34:58 -07:00
|
|
|
@class DashboardViewController;
|
2012-06-19 10:55:46 -07:00
|
|
|
@class FeedsMenuViewController;
|
2012-10-12 13:58:26 -04:00
|
|
|
@class FeedDetailViewController;
|
|
|
|
@class FeedDetailMenuViewController;
|
2012-06-20 09:32:55 -07:00
|
|
|
@class FeedDashboardViewController;
|
2012-06-13 18:07:24 -07:00
|
|
|
@class FirstTimeUserViewController;
|
2012-07-22 14:23:50 -07:00
|
|
|
@class FirstTimeUserAddSitesViewController;
|
|
|
|
@class FirstTimeUserAddFriendsViewController;
|
|
|
|
@class FirstTimeUserAddNewsBlurViewController;
|
2012-07-01 12:08:30 -07:00
|
|
|
@class FriendsListViewController;
|
2012-06-18 14:31:42 -07:00
|
|
|
@class FontSettingsViewController;
|
2010-06-25 18:36:01 -04:00
|
|
|
@class StoryDetailViewController;
|
2012-11-05 17:16:10 -08:00
|
|
|
@class StoryPageControl;
|
2012-06-21 11:53:48 -07:00
|
|
|
@class ShareViewController;
|
2010-10-31 23:02:13 -04:00
|
|
|
@class LoginViewController;
|
2011-12-02 16:23:00 -08:00
|
|
|
@class AddSiteViewController;
|
|
|
|
@class MoveSiteViewController;
|
2012-12-24 23:01:25 -08:00
|
|
|
@class TrainerViewController;
|
2010-11-13 18:32:43 -05:00
|
|
|
@class OriginalStoryViewController;
|
2012-07-01 18:26:39 -07:00
|
|
|
@class UserProfileViewController;
|
2012-07-24 11:44:16 -07:00
|
|
|
@class NBContainerViewController;
|
2013-06-21 17:48:06 -07:00
|
|
|
@class IASKAppSettingsViewController;
|
2012-10-12 15:33:40 -04:00
|
|
|
@class UnreadCounts;
|
2012-06-15 16:35:54 -07:00
|
|
|
|
2013-03-03 14:03:56 -08:00
|
|
|
@interface NewsBlurAppDelegate : BaseViewController <UIApplicationDelegate, UIAlertViewDelegate, UINavigationControllerDelegate> {
|
2010-06-17 13:10:45 -04:00
|
|
|
UIWindow *window;
|
2012-07-22 14:23:50 -07:00
|
|
|
UINavigationController *ftuxNavigationController;
|
2010-06-21 17:17:26 -04:00
|
|
|
UINavigationController *navigationController;
|
2012-07-31 17:17:02 -07:00
|
|
|
UINavigationController *modalNavigationController;
|
2012-08-13 18:45:06 -07:00
|
|
|
UINavigationController *shareNavigationController;
|
2012-07-28 12:56:51 -07:00
|
|
|
UINavigationController *userProfileNavigationController;
|
2013-03-02 19:15:08 -08:00
|
|
|
UINavigationController *trainNavigationController;
|
2012-07-24 11:44:16 -07:00
|
|
|
NBContainerViewController *masterContainerViewController;
|
2012-06-11 16:56:38 -07:00
|
|
|
|
2012-07-22 14:23:50 -07:00
|
|
|
FirstTimeUserViewController *firstTimeUserViewController;
|
|
|
|
FirstTimeUserAddSitesViewController *firstTimeUserAddSitesViewController;
|
|
|
|
FirstTimeUserAddFriendsViewController *firstTimeUserAddFriendsViewController;
|
|
|
|
FirstTimeUserAddNewsBlurViewController *firstTimeUserAddNewsBlurViewController;
|
|
|
|
|
2012-07-10 12:34:58 -07:00
|
|
|
DashboardViewController *dashboardViewController;
|
2012-06-19 11:48:51 -07:00
|
|
|
NewsBlurViewController *feedsViewController;
|
2012-06-19 10:55:46 -07:00
|
|
|
FeedsMenuViewController *feedsMenuViewController;
|
2012-10-12 13:58:26 -04:00
|
|
|
FeedDetailViewController *feedDetailViewController;
|
|
|
|
FeedDetailMenuViewController *feedDetailMenuViewController;
|
2012-06-20 09:32:55 -07:00
|
|
|
FeedDashboardViewController *feedDashboardViewController;
|
2012-07-01 18:26:39 -07:00
|
|
|
FriendsListViewController *friendsListViewController;
|
2012-06-18 14:31:42 -07:00
|
|
|
FontSettingsViewController *fontSettingsViewController;
|
2012-10-12 13:58:26 -04:00
|
|
|
|
2010-06-25 18:36:01 -04:00
|
|
|
StoryDetailViewController *storyDetailViewController;
|
2012-11-05 15:12:42 -08:00
|
|
|
StoryPageControl *storyPageControl;
|
2012-06-21 11:53:48 -07:00
|
|
|
ShareViewController *shareViewController;
|
2010-10-31 23:02:13 -04:00
|
|
|
LoginViewController *loginViewController;
|
2011-12-02 16:23:00 -08:00
|
|
|
AddSiteViewController *addSiteViewController;
|
|
|
|
MoveSiteViewController *moveSiteViewController;
|
2012-12-24 23:01:25 -08:00
|
|
|
TrainerViewController *trainerViewController;
|
2010-11-13 18:32:43 -05:00
|
|
|
OriginalStoryViewController *originalStoryViewController;
|
2012-07-01 18:26:39 -07:00
|
|
|
UserProfileViewController *userProfileViewController;
|
2013-06-21 17:48:06 -07:00
|
|
|
IASKAppSettingsViewController *preferencesViewController;
|
|
|
|
|
2010-11-13 18:32:43 -05:00
|
|
|
NSString * activeUsername;
|
2012-07-03 17:54:36 -07:00
|
|
|
NSString * activeUserProfileId;
|
2012-07-28 14:15:20 -07:00
|
|
|
NSString * activeUserProfileName;
|
2012-10-02 15:39:18 -07:00
|
|
|
BOOL hasNoSites;
|
2011-10-25 09:28:05 -07:00
|
|
|
BOOL isRiverView;
|
2012-06-26 11:45:42 -07:00
|
|
|
BOOL isSocialView;
|
2012-08-08 10:57:38 -07:00
|
|
|
BOOL isSocialRiverView;
|
2012-08-06 19:21:39 -07:00
|
|
|
BOOL isTryFeedView;
|
2012-06-19 15:47:51 -07:00
|
|
|
BOOL popoverHasFeedView;
|
2012-06-29 23:25:56 -07:00
|
|
|
BOOL inFeedDetail;
|
2012-08-02 18:00:48 -07:00
|
|
|
BOOL inStoryDetail;
|
2012-07-16 22:35:28 -07:00
|
|
|
BOOL inFindingStoryMode;
|
2013-07-17 19:22:41 -07:00
|
|
|
BOOL hasLoadedFeedDetail;
|
2013-07-17 19:00:00 -07:00
|
|
|
BOOL hasQueuedReadStories;
|
2012-07-16 19:45:14 -07:00
|
|
|
NSString *tryFeedStoryId;
|
2010-06-25 18:36:01 -04:00
|
|
|
NSDictionary * activeFeed;
|
2012-12-07 17:18:31 -08:00
|
|
|
NSMutableDictionary * activeClassifiers;
|
2012-12-27 00:15:26 -08:00
|
|
|
NSArray * activePopularTags;
|
|
|
|
NSArray * activePopularAuthors;
|
2011-10-20 09:32:39 -07:00
|
|
|
NSString * activeFolder;
|
2012-06-25 18:05:25 -07:00
|
|
|
NSDictionary * activeComment;
|
2012-07-27 12:27:13 -07:00
|
|
|
NSString * activeShareType;
|
2011-10-26 08:40:31 -07:00
|
|
|
NSArray * activeFolderFeeds;
|
2010-06-25 18:36:01 -04:00
|
|
|
NSArray * activeFeedStories;
|
2012-06-22 18:01:08 -07:00
|
|
|
NSArray * activeFeedUserProfiles;
|
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-10-31 10:10:38 -07:00
|
|
|
|
2012-06-20 08:33:16 -07:00
|
|
|
int feedDetailPortraitYCoordinate;
|
2011-07-24 20:34:54 -07:00
|
|
|
int storyCount;
|
2012-11-26 09:54:20 -08:00
|
|
|
int storyLocationsCount;
|
2011-08-09 17:58:43 -07:00
|
|
|
int originalStoryCount;
|
2011-07-29 09:06:17 -07:00
|
|
|
NSInteger selectedIntelligence;
|
2011-11-09 09:51:42 -08:00
|
|
|
int visibleUnreadCount;
|
2012-10-17 15:07:53 -07:00
|
|
|
int savedStoriesCount;
|
2013-06-16 14:09:28 -07:00
|
|
|
int totalUnfetchedStoryCount;
|
2013-06-16 21:39:38 -07:00
|
|
|
int remainingUnfetchedStoryCount;
|
|
|
|
int latestFetchedStoryDate;
|
2013-07-18 18:24:38 -07:00
|
|
|
int latestCachedImageDate;
|
2013-06-21 22:18:54 -07:00
|
|
|
int totalUncachedImagesCount;
|
|
|
|
int remainingUncachedImagesCount;
|
2013-07-19 15:41:43 -07:00
|
|
|
NSMutableDictionary * recentlyReadStories;
|
2013-07-19 12:20:51 -07:00
|
|
|
NSMutableArray * recentlyReadStoryLocations;
|
2011-11-03 18:08:24 -07:00
|
|
|
NSMutableSet * recentlyReadFeeds;
|
2011-08-22 18:25:33 -07:00
|
|
|
NSMutableArray * readStories;
|
2012-10-14 17:30:03 -07:00
|
|
|
NSMutableDictionary *folderCountCache;
|
2011-10-04 18:01:35 -07:00
|
|
|
|
|
|
|
NSDictionary * dictFolders;
|
2012-07-27 16:10:13 -07:00
|
|
|
NSMutableDictionary * dictFeeds;
|
2012-06-26 16:24:19 -07:00
|
|
|
NSMutableDictionary * dictActiveFeeds;
|
2012-06-25 15:02:20 -07:00
|
|
|
NSDictionary * dictSocialFeeds;
|
2013-03-04 20:21:29 -08:00
|
|
|
NSDictionary * dictSocialProfile;
|
2012-07-01 18:26:39 -07:00
|
|
|
NSDictionary * dictUserProfile;
|
2013-03-04 20:21:29 -08:00
|
|
|
NSDictionary * dictSocialServices;
|
2013-06-29 17:28:41 -07:00
|
|
|
NSMutableDictionary * dictUnreadCounts;
|
2012-07-26 23:07:47 -07:00
|
|
|
NSArray * userInteractionsArray;
|
|
|
|
NSArray * userActivitiesArray;
|
2011-10-04 18:01:35 -07:00
|
|
|
NSMutableArray * dictFoldersArray;
|
2012-08-14 17:20:45 -07:00
|
|
|
|
2013-06-14 19:21:30 -07:00
|
|
|
FMDatabaseQueue *database;
|
2013-07-15 18:25:09 -07:00
|
|
|
NSOperationQueue *offlineQueue;
|
2013-08-05 18:32:43 -07:00
|
|
|
NSOperationQueue *offlineCleaningQueue;
|
2012-08-14 17:20:45 -07:00
|
|
|
NSArray *categories;
|
|
|
|
NSDictionary *categoryFeeds;
|
2012-11-01 15:26:50 -07:00
|
|
|
UIImageView *splashView;
|
2013-06-23 22:19:08 -07:00
|
|
|
NSMutableDictionary *activeCachedImages;
|
2010-06-17 13:10:45 -04:00
|
|
|
}
|
|
|
|
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (nonatomic) IBOutlet UIWindow *window;
|
2012-07-22 14:23:50 -07:00
|
|
|
@property (nonatomic) IBOutlet UINavigationController *ftuxNavigationController;
|
2012-07-28 12:56:51 -07:00
|
|
|
@property (nonatomic) IBOutlet UINavigationController *navigationController;
|
2012-07-31 17:17:02 -07:00
|
|
|
@property (nonatomic) UINavigationController *modalNavigationController;
|
2012-08-13 18:45:06 -07:00
|
|
|
@property (nonatomic) UINavigationController *shareNavigationController;
|
2013-03-02 19:15:08 -08:00
|
|
|
@property (nonatomic) UINavigationController *trainNavigationController;
|
2012-07-28 12:56:51 -07:00
|
|
|
@property (nonatomic) UINavigationController *userProfileNavigationController;
|
2012-07-24 11:44:16 -07:00
|
|
|
@property (nonatomic) IBOutlet NBContainerViewController *masterContainerViewController;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (nonatomic) IBOutlet DashboardViewController *dashboardViewController;
|
|
|
|
@property (nonatomic) IBOutlet NewsBlurViewController *feedsViewController;
|
|
|
|
@property (nonatomic) IBOutlet FeedsMenuViewController *feedsMenuViewController;
|
|
|
|
@property (nonatomic) IBOutlet FeedDetailViewController *feedDetailViewController;
|
2012-10-12 13:58:26 -04:00
|
|
|
@property (nonatomic) IBOutlet FeedDetailMenuViewController *feedDetailMenuViewController;
|
|
|
|
@property (nonatomic) IBOutlet FeedDashboardViewController *feedDashboardViewController;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (nonatomic) IBOutlet FriendsListViewController *friendsListViewController;
|
|
|
|
@property (nonatomic) IBOutlet StoryDetailViewController *storyDetailViewController;
|
2012-11-05 15:12:42 -08:00
|
|
|
@property (nonatomic) IBOutlet StoryPageControl *storyPageControl;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (nonatomic) IBOutlet LoginViewController *loginViewController;
|
|
|
|
@property (nonatomic) IBOutlet AddSiteViewController *addSiteViewController;
|
|
|
|
@property (nonatomic) IBOutlet MoveSiteViewController *moveSiteViewController;
|
2012-12-24 23:01:25 -08:00
|
|
|
@property (nonatomic) IBOutlet TrainerViewController *trainerViewController;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (nonatomic) IBOutlet OriginalStoryViewController *originalStoryViewController;
|
|
|
|
@property (nonatomic) IBOutlet ShareViewController *shareViewController;
|
|
|
|
@property (nonatomic) IBOutlet FontSettingsViewController *fontSettingsViewController;
|
|
|
|
@property (nonatomic) IBOutlet UserProfileViewController *userProfileViewController;
|
2013-06-21 17:48:06 -07:00
|
|
|
@property (nonatomic) IBOutlet IASKAppSettingsViewController *preferencesViewController;
|
2010-11-13 13:42:20 -05:00
|
|
|
|
2012-07-22 14:23:50 -07:00
|
|
|
@property (nonatomic) IBOutlet FirstTimeUserViewController *firstTimeUserViewController;
|
|
|
|
@property (nonatomic) IBOutlet FirstTimeUserAddSitesViewController *firstTimeUserAddSitesViewController;
|
|
|
|
@property (nonatomic) IBOutlet FirstTimeUserAddFriendsViewController *firstTimeUserAddFriendsViewController;
|
|
|
|
@property (nonatomic) IBOutlet FirstTimeUserAddNewsBlurViewController *firstTimeUserAddNewsBlurViewController;
|
|
|
|
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (readwrite) NSString * activeUsername;
|
|
|
|
@property (readwrite) NSString * activeUserProfileId;
|
2012-07-28 14:15:20 -07:00
|
|
|
@property (readwrite) NSString * activeUserProfileName;
|
2012-10-02 15:39:18 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL hasNoSites;
|
2011-10-25 09:28:05 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL isRiverView;
|
2012-06-26 11:45:42 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL isSocialView;
|
2012-08-08 10:57:38 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL isSocialRiverView;
|
2012-08-06 19:21:39 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL isTryFeedView;
|
2012-07-16 22:35:28 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL inFindingStoryMode;
|
2013-07-17 19:22:41 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL hasLoadedFeedDetail;
|
2012-07-16 19:45:14 -07:00
|
|
|
@property (nonatomic) NSString *tryFeedStoryId;
|
2012-07-31 23:49:51 -07:00
|
|
|
@property (nonatomic) NSString *tryFeedCategory;
|
2012-06-19 15:47:51 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL popoverHasFeedView;
|
2012-06-29 23:25:56 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL inFeedDetail;
|
2012-08-02 18:00:48 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL inStoryDetail;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (readwrite) NSDictionary * activeFeed;
|
2012-12-11 11:50:06 -08:00
|
|
|
@property (strong, readwrite) NSMutableDictionary * activeClassifiers;
|
2012-12-27 00:15:26 -08:00
|
|
|
@property (strong, readwrite) NSArray * activePopularTags;
|
|
|
|
@property (strong, readwrite) NSArray * activePopularAuthors;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (readwrite) NSString * activeFolder;
|
|
|
|
@property (readwrite) NSDictionary * activeComment;
|
2012-07-27 12:27:13 -07:00
|
|
|
@property (readwrite) NSString * activeShareType;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (readwrite) NSArray * activeFolderFeeds;
|
|
|
|
@property (readwrite) NSArray * activeFeedStories;
|
|
|
|
@property (readwrite) NSArray * activeFeedUserProfiles;
|
|
|
|
@property (readwrite) NSMutableArray * activeFeedStoryLocations;
|
|
|
|
@property (readwrite) NSMutableArray * activeFeedStoryLocationIds;
|
|
|
|
@property (readwrite) NSDictionary * activeStory;
|
|
|
|
@property (readwrite) NSURL * activeOriginalStoryURL;
|
2012-06-20 08:33:16 -07:00
|
|
|
@property (readwrite) int feedDetailPortraitYCoordinate;
|
2011-07-24 20:34:54 -07:00
|
|
|
@property (readwrite) int storyCount;
|
2012-11-26 09:54:20 -08:00
|
|
|
@property (readwrite) int storyLocationsCount;
|
2011-08-09 17:58:43 -07:00
|
|
|
@property (readwrite) int originalStoryCount;
|
2011-11-09 09:51:42 -08:00
|
|
|
@property (readwrite) int visibleUnreadCount;
|
2012-10-17 15:07:53 -07:00
|
|
|
@property (readwrite) int savedStoriesCount;
|
2013-06-16 14:09:28 -07:00
|
|
|
@property (readwrite) int totalUnfetchedStoryCount;
|
2013-06-16 21:39:38 -07:00
|
|
|
@property (readwrite) int remainingUnfetchedStoryCount;
|
2013-06-21 22:18:54 -07:00
|
|
|
@property (readwrite) int totalUncachedImagesCount;
|
|
|
|
@property (readwrite) int remainingUncachedImagesCount;
|
2013-06-16 21:39:38 -07:00
|
|
|
@property (readwrite) int latestFetchedStoryDate;
|
2013-07-18 18:24:38 -07:00
|
|
|
@property (readwrite) int latestCachedImageDate;
|
2011-07-29 09:06:17 -07:00
|
|
|
@property (readwrite) NSInteger selectedIntelligence;
|
2013-07-19 15:41:43 -07:00
|
|
|
@property (readwrite) NSMutableDictionary * recentlyReadStories;
|
2013-07-19 12:20:51 -07:00
|
|
|
@property (readwrite) NSMutableArray * recentlyReadStoryLocations;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (readwrite) NSMutableSet * recentlyReadFeeds;
|
|
|
|
@property (readwrite) NSMutableArray * readStories;
|
2012-10-14 17:30:03 -07:00
|
|
|
@property (nonatomic) NSMutableDictionary *folderCountCache;
|
2010-06-25 18:36:01 -04:00
|
|
|
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (nonatomic) NSDictionary *dictFolders;
|
2012-07-27 16:10:13 -07:00
|
|
|
@property (nonatomic, strong) NSMutableDictionary *dictFeeds;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (nonatomic) NSMutableDictionary *dictActiveFeeds;
|
|
|
|
@property (nonatomic) NSDictionary *dictSocialFeeds;
|
2013-03-04 20:21:29 -08:00
|
|
|
@property (nonatomic) NSDictionary *dictSocialProfile;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (nonatomic) NSDictionary *dictUserProfile;
|
2013-03-04 20:21:29 -08:00
|
|
|
@property (nonatomic) NSDictionary *dictSocialServices;
|
2013-06-29 17:28:41 -07:00
|
|
|
@property (nonatomic, strong) NSMutableDictionary *dictUnreadCounts;
|
2012-07-26 23:07:47 -07:00
|
|
|
@property (nonatomic) NSArray *userInteractionsArray;
|
|
|
|
@property (nonatomic) NSArray *userActivitiesArray;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (nonatomic) NSMutableArray *dictFoldersArray;
|
2011-10-04 18:01:35 -07:00
|
|
|
|
2012-08-14 17:20:45 -07:00
|
|
|
@property (nonatomic) NSArray *categories;
|
|
|
|
@property (nonatomic) NSDictionary *categoryFeeds;
|
2013-06-14 19:21:30 -07:00
|
|
|
@property (readwrite) FMDatabaseQueue *database;
|
2013-07-15 18:25:09 -07:00
|
|
|
@property (nonatomic) NSOperationQueue *offlineQueue;
|
2013-08-05 18:32:43 -07:00
|
|
|
@property (nonatomic) NSOperationQueue *offlineCleaningQueue;
|
2013-06-23 22:19:08 -07:00
|
|
|
@property (nonatomic) NSMutableDictionary *activeCachedImages;
|
2013-07-15 18:25:09 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL hasQueuedReadStories;
|
2012-08-14 17:20:45 -07:00
|
|
|
|
2011-12-03 18:22:14 -08:00
|
|
|
+ (NewsBlurAppDelegate*) sharedAppDelegate;
|
2012-11-01 15:26:50 -07:00
|
|
|
- (void)startupAnimationDone:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context;
|
2013-07-16 18:06:36 -07:00
|
|
|
- (void)registerDefaultsFromSettingsBundle;
|
2011-12-03 18:22:14 -08:00
|
|
|
|
2012-06-13 18:07:24 -07:00
|
|
|
- (void)showFirstTimeUser;
|
2010-11-11 23:48:27 -05:00
|
|
|
- (void)showLogin;
|
2013-05-30 18:45:51 -07:00
|
|
|
- (void)setupReachability;
|
2012-06-24 23:02:37 -07:00
|
|
|
|
2012-07-01 12:08:30 -07:00
|
|
|
// social
|
2012-07-28 12:56:51 -07:00
|
|
|
- (void)showUserProfileModal:(id)sender;
|
2012-07-28 14:15:20 -07:00
|
|
|
- (void)pushUserProfile;
|
2012-07-12 22:05:23 -07:00
|
|
|
- (void)hideUserProfileModal;
|
2012-07-01 12:08:30 -07:00
|
|
|
- (void)showFindFriends;
|
2013-06-21 17:48:06 -07:00
|
|
|
- (void)showPreferences;
|
2012-07-28 23:31:12 -07:00
|
|
|
|
2011-12-03 18:22:14 -08:00
|
|
|
- (void)showMoveSite;
|
2012-12-24 23:01:25 -08:00
|
|
|
- (void)openTrainSite;
|
2012-12-27 23:04:25 -08:00
|
|
|
- (void)openTrainStory:(id)sender;
|
2010-06-25 18:36:01 -04:00
|
|
|
- (void)loadFeedDetailView;
|
2012-08-12 21:46:47 -07:00
|
|
|
- (void)loadTryFeedDetailView:(NSString *)feedId withStory:(NSString *)contentId isSocial:(BOOL)social withUser:(NSDictionary *)user showFindingStory:(BOOL)showHUD;
|
2011-10-26 08:40:31 -07:00
|
|
|
- (void)loadRiverFeedDetailView;
|
2010-06-25 18:36:01 -04:00
|
|
|
- (void)loadStoryDetailView;
|
2012-06-29 21:15:43 -07:00
|
|
|
- (void)adjustStoryDetailWebView;
|
2012-07-23 15:27:20 -07:00
|
|
|
- (void)calibrateStoryTitles;
|
2012-12-12 15:08:24 -08:00
|
|
|
- (void)recalculateIntelligenceScores:(id)feedId;
|
2011-12-03 18:22:14 -08:00
|
|
|
- (void)reloadFeedsView:(BOOL)showLoader;
|
2010-11-11 23:48:27 -05:00
|
|
|
- (void)setTitle:(NSString *)title;
|
2012-06-14 10:19:36 -07:00
|
|
|
- (void)showOriginalStory:(NSURL *)url;
|
2010-11-13 18:32:43 -05:00
|
|
|
- (void)closeOriginalStory;
|
2012-07-10 12:34:58 -07:00
|
|
|
- (void)hideStoryDetailView;
|
2012-06-20 19:18:29 -07:00
|
|
|
- (void)changeActiveFeedDetailRow;
|
2012-06-20 08:33:16 -07:00
|
|
|
- (void)dragFeedDetailView:(float)y;
|
2012-07-30 14:58:57 -07:00
|
|
|
- (void)showShareView:(NSString *)type setUserId:(NSString *)userId setUsername:(NSString *)username setReplyId:(NSString *)commentIndex;
|
2012-07-12 13:34:41 -07:00
|
|
|
- (void)hideShareView:(BOOL)resetComment;
|
2012-06-27 15:24:18 -07:00
|
|
|
- (void)resetShareComments;
|
2012-06-26 12:12:31 -07:00
|
|
|
- (BOOL)isSocialFeed:(NSString *)feedIdStr;
|
2012-07-02 13:10:00 -07:00
|
|
|
- (BOOL)isPortrait;
|
2012-10-30 17:05:39 -07:00
|
|
|
- (NSString *)orderKey;
|
|
|
|
- (NSString *)readFilterKey;
|
2012-07-02 11:28:55 -07:00
|
|
|
- (void)confirmLogout;
|
2013-03-04 20:21:29 -08:00
|
|
|
- (void)showConnectToService:(NSString *)serviceName;
|
|
|
|
- (void)refreshUserProfile:(void(^)())callback;
|
2011-08-22 18:25:33 -07:00
|
|
|
|
2012-06-28 15:03:28 -07:00
|
|
|
- (int)indexOfNextUnreadStory;
|
2012-11-06 13:45:15 -08:00
|
|
|
- (int)locationOfNextUnreadStory;
|
2011-06-15 11:21:55 -04:00
|
|
|
- (int)indexOfNextStory;
|
2012-11-06 13:45:15 -08:00
|
|
|
- (int)locationOfNextStory;
|
2011-06-15 11:21:55 -04:00
|
|
|
- (int)indexOfActiveStory;
|
2012-11-06 13:45:15 -08:00
|
|
|
- (int)indexOfStoryId:(id)storyId;
|
2011-08-08 09:58:15 -07:00
|
|
|
- (int)locationOfActiveStory;
|
2012-11-06 13:45:15 -08:00
|
|
|
- (int)indexFromLocation:(int)location;
|
2011-08-22 18:25:33 -07:00
|
|
|
- (void)pushReadStory:(id)storyId;
|
|
|
|
- (id)popReadStory;
|
|
|
|
- (int)locationOfStoryId:(id)storyId;
|
2013-06-21 18:35:06 -07:00
|
|
|
- (NSString *)activeOrder;
|
|
|
|
- (NSString *)activeReadFilter;
|
2011-08-22 18:25:33 -07:00
|
|
|
|
2011-07-24 16:52:24 -07:00
|
|
|
- (void)setStories:(NSArray *)activeFeedStoriesValue;
|
2012-06-22 18:01:08 -07:00
|
|
|
- (void)setFeedUserProfiles:(NSArray *)activeFeedUserProfilesValue;
|
2011-07-24 16:52:24 -07:00
|
|
|
- (void)addStories:(NSArray *)stories;
|
2012-06-22 18:01:08 -07:00
|
|
|
- (void)addFeedUserProfiles:(NSArray *)activeFeedUserProfilesValue;
|
2013-06-29 17:28:41 -07:00
|
|
|
|
|
|
|
- (void)populateDictUnreadCounts;
|
2011-07-26 08:37:10 -07:00
|
|
|
- (int)unreadCount;
|
2012-07-29 22:14:08 -07:00
|
|
|
- (int)allUnreadCount;
|
2011-10-31 10:10:38 -07:00
|
|
|
- (int)unreadCountForFeed:(NSString *)feedId;
|
|
|
|
- (int)unreadCountForFolder:(NSString *)folderName;
|
2012-10-12 15:33:40 -04:00
|
|
|
- (UnreadCounts *)splitUnreadCountForFeed:(NSString *)feedId;
|
|
|
|
- (UnreadCounts *)splitUnreadCountForFolder:(NSString *)folderName;
|
2011-07-24 20:34:54 -07:00
|
|
|
- (void)markActiveStoryRead;
|
2012-10-16 17:24:01 -07:00
|
|
|
- (void)markActiveStoryUnread;
|
2011-11-10 18:28:22 -08:00
|
|
|
- (NSDictionary *)markVisibleStoriesRead;
|
|
|
|
- (void)markStoryRead:(NSString *)storyId feedId:(id)feedId;
|
|
|
|
- (void)markStoryRead:(NSDictionary *)story feed:(NSDictionary *)feed;
|
2012-10-16 17:24:01 -07:00
|
|
|
- (void)markStoryUnread:(NSString *)storyId feedId:(id)feedId;
|
|
|
|
- (void)markStoryUnread:(NSDictionary *)story feed:(NSDictionary *)feed;
|
2012-10-17 15:07:53 -07:00
|
|
|
- (void)markActiveStorySaved:(BOOL)saved;
|
2011-07-24 22:23:38 -07:00
|
|
|
- (void)markActiveFeedAllRead;
|
2011-11-09 09:51:42 -08:00
|
|
|
- (void)markActiveFolderAllRead;
|
2011-11-10 18:28:22 -08:00
|
|
|
- (void)markFeedAllRead:(id)feedId;
|
2011-07-29 21:27:37 -07:00
|
|
|
- (void)calculateStoryLocations;
|
2010-11-22 10:44:52 -05:00
|
|
|
+ (int)computeStoryScore:(NSDictionary *)intelligence;
|
2011-12-04 21:09:16 -08:00
|
|
|
- (NSString *)extractFolderName:(NSString *)folderName;
|
|
|
|
- (NSString *)extractParentFolderName:(NSString *)folderName;
|
2012-12-28 11:34:06 -08:00
|
|
|
- (NSDictionary *)getFeed:(NSString *)feedId;
|
|
|
|
|
2013-02-14 15:36:21 -08:00
|
|
|
+ (void)fillGradient:(CGRect)r startColor:(UIColor *)startColor endColor:(UIColor *)endColor;
|
2011-10-27 19:05:38 -07:00
|
|
|
+ (UIView *)makeGradientView:(CGRect)rect startColor:(NSString *)start endColor:(NSString *)end;
|
2011-10-28 18:29:33 -07:00
|
|
|
- (UIView *)makeFeedTitleGradient:(NSDictionary *)feed withRect:(CGRect)rect;
|
2011-12-02 16:23:00 -08:00
|
|
|
- (UIView *)makeFeedTitle:(NSDictionary *)feed;
|
2012-07-12 22:05:23 -07:00
|
|
|
- (UIButton *)makeRightFeedTitle:(NSDictionary *)feed;
|
2012-12-27 18:37:05 -08:00
|
|
|
|
|
|
|
- (void)toggleAuthorClassifier:(NSString *)author feedId:(NSString *)feedId;
|
|
|
|
- (void)toggleTagClassifier:(NSString *)tag feedId:(NSString *)feedId;
|
|
|
|
- (void)toggleTitleClassifier:(NSString *)title feedId:(NSString *)feedId score:(int)score;
|
|
|
|
- (void)toggleFeedClassifier:(NSString *)feedId;
|
|
|
|
|
2013-06-14 19:21:30 -07:00
|
|
|
- (int)databaseSchemaVersion:(FMDatabase *)db;
|
|
|
|
- (void)createDatabaseConnection;
|
|
|
|
- (void)setupDatabase:(FMDatabase *)db;
|
2013-07-18 18:24:38 -07:00
|
|
|
- (void)cancelOfflineQueue;
|
2013-07-15 18:25:09 -07:00
|
|
|
- (void)startOfflineQueue;
|
|
|
|
- (void)startOfflineFetchStories;
|
|
|
|
- (void)startOfflineFetchImages;
|
2013-09-04 15:56:37 -07:00
|
|
|
- (BOOL)isReachabileForOffline;
|
2013-08-06 18:08:55 -07:00
|
|
|
- (void)queueReadStories:(NSDictionary *)feedsStories;
|
2013-06-16 14:09:28 -07:00
|
|
|
- (void)flushQueuedReadStories:(BOOL)forceCheck withCallback:(void(^)())callback;
|
|
|
|
- (void)syncQueuedReadStories:(FMDatabase *)db withStories:(NSDictionary *)hashes withCallback:(void(^)())callback;
|
2013-06-23 22:19:08 -07:00
|
|
|
- (void)prepareActiveCachedImages:(FMDatabase *)db;
|
2013-07-15 18:25:09 -07:00
|
|
|
- (void)deleteAllCachedImages;
|
2013-05-30 18:45:51 -07:00
|
|
|
|
2010-06-17 13:10:45 -04:00
|
|
|
@end
|
|
|
|
|
2012-10-12 15:33:40 -04:00
|
|
|
@interface UnreadCounts : NSObject {
|
2012-10-07 15:47:21 -04:00
|
|
|
int ps;
|
|
|
|
int nt;
|
|
|
|
int ng;
|
|
|
|
}
|
|
|
|
|
|
|
|
@property (readwrite) int ps;
|
|
|
|
@property (readwrite) int nt;
|
|
|
|
@property (readwrite) int ng;
|
|
|
|
|
2012-10-12 15:33:40 -04:00
|
|
|
- (void)addCounts:(UnreadCounts *)counts;
|
2012-10-07 15:47:21 -04:00
|
|
|
|
|
|
|
@end
|
|
|
|
|