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"
|
2014-09-17 19:02:12 -07:00
|
|
|
#import "EventWindow.h"
|
2014-11-10 16:00:59 -08:00
|
|
|
#import "WYPopoverController.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-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;
|
2014-11-10 16:00:59 -08:00
|
|
|
@class UserTagsViewController;
|
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;
|
2014-02-12 20:09:37 -08:00
|
|
|
@class StoriesCollection;
|
2014-02-24 18:56:51 -08:00
|
|
|
@class TMCache;
|
2012-06-15 16:35:54 -07:00
|
|
|
|
2013-11-23 13:03:14 -08:00
|
|
|
@interface NewsBlurAppDelegate : BaseViewController
|
2015-09-14 17:40:18 -07:00
|
|
|
<UIApplicationDelegate, UIAlertViewDelegate, UINavigationControllerDelegate, WYPopoverControllerDelegate> {
|
2014-09-17 19:02:12 -07:00
|
|
|
EventWindow *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-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;
|
2014-11-10 16:00:59 -08:00
|
|
|
UserTagsViewController *userTagsViewController;
|
2010-11-13 18:32:43 -05:00
|
|
|
OriginalStoryViewController *originalStoryViewController;
|
2013-09-24 17:18:20 -07:00
|
|
|
UINavigationController *originalStoryViewNavController;
|
2012-07-01 18:26:39 -07:00
|
|
|
UserProfileViewController *userProfileViewController;
|
2013-06-21 17:48:06 -07:00
|
|
|
IASKAppSettingsViewController *preferencesViewController;
|
2014-11-10 16:00:59 -08:00
|
|
|
WYPopoverController *popoverController;
|
|
|
|
|
2014-10-23 16:11:02 -07:00
|
|
|
UIColor *tintColor;
|
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;
|
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;
|
2015-03-10 18:58:23 -07:00
|
|
|
BOOL inTextView;
|
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;
|
2014-02-12 16:39:30 -08:00
|
|
|
|
2010-06-25 18:36:01 -04:00
|
|
|
NSDictionary * activeStory;
|
2010-11-13 18:32:43 -05:00
|
|
|
NSURL * activeOriginalStoryURL;
|
2014-02-12 16:39:30 -08:00
|
|
|
NSString * activeShareType;
|
|
|
|
NSDictionary * activeComment;
|
2012-06-20 08:33:16 -07:00
|
|
|
int feedDetailPortraitYCoordinate;
|
2011-08-09 17:58:43 -07:00
|
|
|
int originalStoryCount;
|
2011-07-29 09:06:17 -07:00
|
|
|
NSInteger selectedIntelligence;
|
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;
|
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;
|
2014-09-26 18:35:40 -07:00
|
|
|
NSMutableDictionary *collapsedFolders;
|
2014-10-01 14:23:57 -07:00
|
|
|
UIFontDescriptor *fontDescriptorTitleSize;
|
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;
|
2014-02-11 15:20:41 -08:00
|
|
|
NSOperationQueue *cacheImagesOperationQueue;
|
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;
|
2014-02-24 18:56:51 -08:00
|
|
|
|
|
|
|
TMCache *cachedFavicons;
|
|
|
|
TMCache *cachedStoryImages;
|
2010-06-17 13:10:45 -04:00
|
|
|
}
|
|
|
|
|
2014-09-17 19:02:12 -07:00
|
|
|
@property (nonatomic) IBOutlet EventWindow *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;
|
2013-09-24 17:18:20 -07:00
|
|
|
@property (nonatomic) UINavigationController *originalStoryViewNavController;
|
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;
|
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;
|
2014-11-10 16:00:59 -08:00
|
|
|
@property (nonatomic) IBOutlet UserTagsViewController *userTagsViewController;
|
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;
|
2014-11-10 16:00:59 -08:00
|
|
|
@property (nonatomic, retain) WYPopoverController *popoverController;
|
|
|
|
|
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;
|
|
|
|
|
2014-02-12 20:09:37 -08:00
|
|
|
@property (nonatomic, readwrite) StoriesCollection *storiesCollection;
|
2014-02-24 18:56:51 -08:00
|
|
|
@property (nonatomic, readwrite) TMCache *cachedFavicons;
|
|
|
|
@property (nonatomic, readwrite) TMCache *cachedStoryImages;
|
|
|
|
|
2014-10-23 16:11:02 -07:00
|
|
|
@property (nonatomic) UIColor *tintColor;
|
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;
|
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;
|
2015-03-10 18:58:23 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL inTextView;
|
2014-10-30 17:26:34 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL isPresentingActivities;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (readwrite) NSDictionary * activeStory;
|
|
|
|
@property (readwrite) NSURL * activeOriginalStoryURL;
|
2014-02-12 20:09:37 -08:00
|
|
|
@property (readwrite) NSDictionary * activeComment;
|
|
|
|
@property (readwrite) NSString * activeShareType;
|
2012-06-20 08:33:16 -07:00
|
|
|
@property (readwrite) int feedDetailPortraitYCoordinate;
|
2011-08-09 17:58:43 -07:00
|
|
|
@property (readwrite) int originalStoryCount;
|
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;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (readwrite) NSMutableSet * recentlyReadFeeds;
|
|
|
|
@property (readwrite) NSMutableArray * readStories;
|
2013-09-05 12:38:06 -07:00
|
|
|
@property (readwrite) NSMutableDictionary *unreadStoryHashes;
|
2012-10-14 17:30:03 -07:00
|
|
|
@property (nonatomic) NSMutableDictionary *folderCountCache;
|
2014-09-26 18:35:40 -07:00
|
|
|
@property (nonatomic) NSMutableDictionary *collapsedFolders;
|
2014-10-01 14:23:57 -07:00
|
|
|
@property (nonatomic) UIFontDescriptor *fontDescriptorTitleSize;
|
|
|
|
|
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;
|
2014-05-20 12:21:17 -07:00
|
|
|
@property (nonatomic) NSDictionary *dictSavedStoryTags;
|
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;
|
2014-02-11 15:20:41 -08:00
|
|
|
@property (nonatomic) NSOperationQueue *cacheImagesOperationQueue;
|
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
|
|
|
|
2013-10-17 12:32:19 -07:00
|
|
|
@property (nonatomic, strong) void (^backgroundCompletionHandler)(UIBackgroundFetchResult);
|
|
|
|
|
2011-12-03 18:22:14 -08:00
|
|
|
+ (NewsBlurAppDelegate*) sharedAppDelegate;
|
2013-07-16 18:06:36 -07:00
|
|
|
- (void)registerDefaultsFromSettingsBundle;
|
2013-10-17 12:32:19 -07:00
|
|
|
- (void)finishBackground;
|
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
|
2013-09-25 17:43:00 -07:00
|
|
|
- (NSDictionary *)getUser:(NSInteger)userId;
|
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;
|
2014-01-06 18:37:57 -08:00
|
|
|
- (void)showSendTo:(UIViewController *)vc sender:(id)sender;
|
|
|
|
- (void)showSendTo:(UIViewController *)vc sender:(id)sender
|
|
|
|
withUrl:(NSURL *)url
|
2014-01-06 17:54:18 -08:00
|
|
|
authorName:(NSString *)authorName
|
|
|
|
text:(NSString *)text
|
|
|
|
title:(NSString *)title
|
|
|
|
feedTitle:(NSString *)title
|
|
|
|
images:(NSArray *)images;
|
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;
|
2013-10-02 16:28:09 -07:00
|
|
|
- (void)openTrainSiteWithFeedLoaded:(BOOL)feedLoaded from:(id)sender;
|
2012-12-27 23:04:25 -08:00
|
|
|
- (void)openTrainStory:(id)sender;
|
2014-11-10 16:00:59 -08:00
|
|
|
- (void)openUserTagsStory:(id)sender;
|
2010-06-25 18:36:01 -04:00
|
|
|
- (void)loadFeedDetailView;
|
2014-02-10 19:21:53 -08:00
|
|
|
- (void)loadFeedDetailView:(BOOL)transition;
|
2012-08-12 21:46:47 -07:00
|
|
|
- (void)loadTryFeedDetailView:(NSString *)feedId withStory:(NSString *)contentId isSocial:(BOOL)social withUser:(NSDictionary *)user showFindingStory:(BOOL)showHUD;
|
2013-09-11 17:05:47 -07:00
|
|
|
- (void)loadStarredDetailViewWithStory:(NSString *)contentId showFindingStory:(BOOL)showHUD;
|
2014-02-12 20:09:37 -08:00
|
|
|
- (void)loadRiverFeedDetailView:(FeedDetailViewController *)feedDetailView withFolder:(NSString *)folder;
|
2014-02-18 18:38:07 -08:00
|
|
|
- (void)openDashboardRiverForStory:(NSString *)contentId
|
|
|
|
showFindingStory:(BOOL)showHUD;
|
2014-02-10 19:21:53 -08:00
|
|
|
|
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-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;
|
2014-05-20 12:21:17 -07:00
|
|
|
- (BOOL)isSavedFeed:(NSString *)feedIdStr;
|
2012-07-02 13:10:00 -07:00
|
|
|
- (BOOL)isPortrait;
|
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;
|
2014-03-21 16:23:51 -07:00
|
|
|
- (void)refreshFeedCount:(id)feedId;
|
2011-08-22 18:25:33 -07:00
|
|
|
|
2013-06-29 17:28:41 -07:00
|
|
|
- (void)populateDictUnreadCounts;
|
2013-09-25 17:43:00 -07:00
|
|
|
- (NSInteger)unreadCount;
|
|
|
|
- (NSInteger)allUnreadCount;
|
|
|
|
- (NSInteger)unreadCountForFeed:(NSString *)feedId;
|
|
|
|
- (NSInteger)unreadCountForFolder:(NSString *)folderName;
|
2012-10-12 15:33:40 -04:00
|
|
|
- (UnreadCounts *)splitUnreadCountForFeed:(NSString *)feedId;
|
|
|
|
- (UnreadCounts *)splitUnreadCountForFolder:(NSString *)folderName;
|
2011-11-10 18:28:22 -08:00
|
|
|
- (NSDictionary *)markVisibleStoriesRead;
|
2014-09-26 18:35:40 -07:00
|
|
|
- (BOOL)isFolderCollapsed:(NSString *)folderName;
|
2013-09-30 16:18:11 -07:00
|
|
|
|
2011-11-09 09:51:42 -08:00
|
|
|
- (void)markActiveFolderAllRead;
|
2011-11-10 18:28:22 -08:00
|
|
|
- (void)markFeedAllRead:(id)feedId;
|
2013-09-30 16:18:11 -07:00
|
|
|
- (void)markFeedReadInCache:(NSArray *)feedIds;
|
2013-10-08 19:33:11 -07:00
|
|
|
- (void)markFeedReadInCache:(NSArray *)feedIds cutoffTimestamp:(NSInteger)cutoff;
|
|
|
|
- (void)markStoriesRead:(NSDictionary *)stories inFeeds:(NSArray *)feeds cutoffTimestamp:(NSInteger)cutoff;
|
2013-09-30 16:18:11 -07:00
|
|
|
- (void)requestFailedMarkStoryRead:(ASIFormDataRequest *)request;
|
|
|
|
- (void)finishMarkAllAsRead:(ASIHTTPRequest *)request;
|
2014-03-05 14:13:49 -08:00
|
|
|
- (void)finishMarkAsRead:(NSDictionary *)story;
|
|
|
|
- (void)finishMarkAsUnread:(NSDictionary *)story;
|
|
|
|
- (void)failedMarkAsUnread:(ASIFormDataRequest *)request;
|
|
|
|
- (void)finishMarkAsSaved:(ASIFormDataRequest *)request;
|
|
|
|
- (void)failedMarkAsSaved:(ASIFormDataRequest *)request;
|
|
|
|
- (void)finishMarkAsUnsaved:(ASIFormDataRequest *)request;
|
|
|
|
- (void)failedMarkAsUnsaved:(ASIFormDataRequest *)request;
|
2014-12-16 15:36:58 -08:00
|
|
|
- (NSInteger)adjustSavedStoryCount:(NSString *)tagName direction:(NSInteger)direction;
|
2014-11-04 17:53:27 -08:00
|
|
|
- (NSArray *)updateStarredStoryCounts:(NSDictionary *)results;
|
2015-04-26 22:34:12 -07:00
|
|
|
- (void)renameFeed:(NSString *)newTitle;
|
|
|
|
- (void)renameFolder:(NSString *)newTitle;
|
2013-09-30 16:18:11 -07:00
|
|
|
|
2014-03-21 16:23:51 -07:00
|
|
|
+ (int)computeStoryScore:(NSDictionary *)intelligence;
|
2011-12-04 21:09:16 -08:00
|
|
|
- (NSString *)extractFolderName:(NSString *)folderName;
|
|
|
|
- (NSString *)extractParentFolderName:(NSString *)folderName;
|
2014-10-30 18:05:34 -07:00
|
|
|
- (NSArray *)parentFoldersForFeed:(NSString *)feedId;
|
2012-12-28 11:34:06 -08:00
|
|
|
- (NSDictionary *)getFeed:(NSString *)feedId;
|
2014-03-05 14:13:49 -08:00
|
|
|
- (NSDictionary *)getStory:(NSString *)storyHash;
|
2012-12-28 11:34:06 -08:00
|
|
|
|
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;
|
2014-02-24 18:56:51 -08:00
|
|
|
- (void)saveFavicon:(UIImage *)image feedId:(NSString *)filename;
|
|
|
|
- (UIImage *)getFavicon:(NSString *)filename;
|
|
|
|
- (UIImage *)getFavicon:(NSString *)filename isSocial:(BOOL)isSocial;
|
2014-05-20 13:12:03 -07:00
|
|
|
- (UIImage *)getFavicon:(NSString *)filename isSocial:(BOOL)isSocial isSaved:(BOOL)isSaved;
|
2012-12-27 18:37:05 -08:00
|
|
|
|
|
|
|
- (void)toggleAuthorClassifier:(NSString *)author feedId:(NSString *)feedId;
|
|
|
|
- (void)toggleTagClassifier:(NSString *)tag feedId:(NSString *)feedId;
|
2013-09-25 17:43:00 -07:00
|
|
|
- (void)toggleTitleClassifier:(NSString *)title feedId:(NSString *)feedId score:(NSInteger)score;
|
2012-12-27 18:37:05 -08:00
|
|
|
- (void)toggleFeedClassifier:(NSString *)feedId;
|
2013-09-05 17:07:21 -07:00
|
|
|
- (void)requestClassifierResponse:(ASIHTTPRequest *)request withFeed:(NSString *)feedId;
|
2012-12-27 18:37:05 -08:00
|
|
|
|
2013-09-25 17:43:00 -07:00
|
|
|
- (NSInteger)databaseSchemaVersion:(FMDatabase *)db;
|
2013-06-14 19:21:30 -07:00
|
|
|
- (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-09-05 16:34:39 -07:00
|
|
|
- (void)storeUserProfiles:(NSArray *)userProfiles;
|
2013-08-06 18:08:55 -07:00
|
|
|
- (void)queueReadStories:(NSDictionary *)feedsStories;
|
2013-10-03 18:07:39 -07:00
|
|
|
- (BOOL)dequeueReadStoryHash:(NSString *)storyHash inFeed:(NSString *)storyFeedId;
|
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-10-08 16:00:55 -07:00
|
|
|
- (void)cleanImageCache;
|
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
|
|
|
|
|