2010-06-20 11:04:23 -04:00
|
|
|
//
|
|
|
|
// NewsBlurViewController.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-20 11:04:23 -04:00
|
|
|
//
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
2010-11-13 13:42:20 -05:00
|
|
|
#import "NewsBlurAppDelegate.h"
|
2012-10-02 15:39:18 -07:00
|
|
|
#import "FolderTitleView.h"
|
2011-10-27 09:44:58 -07:00
|
|
|
#import "BaseViewController.h"
|
2013-06-16 21:39:38 -07:00
|
|
|
#import "NBNotifier.h"
|
2013-06-21 17:48:06 -07:00
|
|
|
#import "IASKAppSettingsViewController.h"
|
2013-09-27 17:54:06 -07:00
|
|
|
#import "MCSwipeTableViewCell.h"
|
2010-06-20 11:04:23 -04:00
|
|
|
|
2010-06-21 17:17:26 -04:00
|
|
|
@class NewsBlurAppDelegate;
|
|
|
|
|
2013-10-17 17:23:52 -07:00
|
|
|
@interface NewsBlurViewController : BaseViewController
|
2012-12-20 12:08:35 -08:00
|
|
|
<UITableViewDelegate, UITableViewDataSource,
|
2017-03-09 20:29:30 -08:00
|
|
|
NSCacheDelegate,
|
2013-06-21 17:48:06 -07:00
|
|
|
UIPopoverControllerDelegate,
|
2013-09-27 17:54:06 -07:00
|
|
|
IASKSettingsDelegate,
|
2013-10-08 19:33:11 -07:00
|
|
|
MCSwipeTableViewCellDelegate,
|
2015-11-29 18:08:44 -08:00
|
|
|
UIGestureRecognizerDelegate> {
|
2010-06-21 17:17:26 -04:00
|
|
|
NewsBlurAppDelegate *appDelegate;
|
|
|
|
|
2011-08-02 10:13:06 -07:00
|
|
|
NSMutableDictionary * activeFeedLocations;
|
2011-10-31 10:10:38 -07:00
|
|
|
NSMutableDictionary *stillVisibleFeeds;
|
2012-12-20 12:08:35 -08:00
|
|
|
NSMutableDictionary *visibleFolders;
|
2013-06-20 20:38:40 -07:00
|
|
|
|
|
|
|
BOOL isOffline;
|
2011-08-04 17:27:31 -07:00
|
|
|
BOOL viewShowingAllFeeds;
|
2013-12-10 18:14:32 -08:00
|
|
|
BOOL interactiveFeedDetailTransition;
|
2011-08-04 17:58:28 -07:00
|
|
|
NSDate *lastUpdate;
|
2011-10-14 09:51:27 -07:00
|
|
|
NSCache *imageCache;
|
2010-06-20 11:04:23 -04:00
|
|
|
|
2012-07-14 01:16:35 -07:00
|
|
|
UITableView * feedTitlesTable;
|
|
|
|
UIToolbar * feedViewToolbar;
|
|
|
|
UISlider * feedScoreSlider;
|
|
|
|
UIBarButtonItem * homeButton;
|
2013-02-20 17:00:01 -08:00
|
|
|
UIBarButtonItem * addBarButton;
|
|
|
|
UIBarButtonItem * settingsBarButton;
|
2013-02-26 19:39:13 -08:00
|
|
|
UIBarButtonItem * activitiesButton;
|
2012-07-14 01:16:35 -07:00
|
|
|
UISegmentedControl * intelligenceControl;
|
2013-06-16 21:39:38 -07:00
|
|
|
NBNotifier *notifier;
|
2010-06-20 11:04:23 -04:00
|
|
|
}
|
|
|
|
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (nonatomic) IBOutlet NewsBlurAppDelegate *appDelegate;
|
|
|
|
@property (nonatomic) IBOutlet UIView *innerView;
|
|
|
|
@property (nonatomic) IBOutlet UITableView *feedTitlesTable;
|
|
|
|
@property (nonatomic) IBOutlet UIToolbar *feedViewToolbar;
|
|
|
|
@property (nonatomic) IBOutlet UISlider * feedScoreSlider;
|
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem * homeButton;
|
2013-02-20 17:00:01 -08:00
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem * addBarButton;
|
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem * settingsBarButton;
|
2013-02-26 19:39:13 -08:00
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem * activitiesButton;
|
2013-10-17 17:23:52 -07:00
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem *userInfoBarButton;
|
|
|
|
@property (nonatomic) IBOutlet UIBarButtonItem *userAvatarButton;
|
|
|
|
@property (nonatomic) IBOutlet UILabel *neutralCount;
|
|
|
|
@property (nonatomic) IBOutlet UILabel *positiveCount;
|
|
|
|
@property (nonatomic) IBOutlet UILabel *userLabel;
|
2017-10-04 14:42:10 -07:00
|
|
|
@property (nonatomic) IBOutlet UIImageView *yellowIcon;
|
2013-10-17 17:23:52 -07:00
|
|
|
@property (nonatomic) IBOutlet UIImageView *greenIcon;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (nonatomic) NSMutableDictionary *activeFeedLocations;
|
|
|
|
@property (nonatomic) NSMutableDictionary *stillVisibleFeeds;
|
2012-12-20 12:08:35 -08:00
|
|
|
@property (nonatomic) NSMutableDictionary *visibleFolders;
|
2012-07-12 00:10:42 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL viewShowingAllFeeds;
|
2013-12-10 18:14:32 -08:00
|
|
|
@property (nonatomic, readwrite) BOOL interactiveFeedDetailTransition;
|
2013-06-20 20:38:40 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL isOffline;
|
2016-09-13 15:38:51 -07:00
|
|
|
@property (nonatomic) UIRefreshControl *refreshControl;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (nonatomic) NSDate *lastUpdate;
|
|
|
|
@property (nonatomic) NSCache *imageCache;
|
|
|
|
@property (nonatomic) IBOutlet UISegmentedControl * intelligenceControl;
|
2012-07-15 16:46:46 -07:00
|
|
|
@property (nonatomic) NSIndexPath *currentRowAtIndexPath;
|
2013-10-17 17:23:52 -07:00
|
|
|
@property (nonatomic) NSInteger currentSection;
|
2012-08-15 19:31:34 -07:00
|
|
|
@property (strong, nonatomic) IBOutlet UIView *noFocusMessage;
|
|
|
|
@property (strong, nonatomic) IBOutlet UIBarButtonItem *toolbarLeftMargin;
|
2013-06-16 21:39:38 -07:00
|
|
|
@property (nonatomic, retain) NBNotifier *notifier;
|
2015-09-18 15:02:15 -07:00
|
|
|
@property (nonatomic, retain) UIImageView *avatarImageView;
|
2012-07-12 00:10:42 -07:00
|
|
|
|
2013-02-27 19:25:57 -08:00
|
|
|
- (void)layoutForInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
|
2011-08-18 21:48:30 -07:00
|
|
|
- (void)returnToApp;
|
2012-08-09 10:18:15 -07:00
|
|
|
- (void)fetchFeedList:(BOOL)showLoader;
|
2014-02-27 14:49:33 -08:00
|
|
|
- (void)finishLoadingFeedListWithDict:(NSDictionary *)results finished:(BOOL)finished;
|
2011-10-25 09:47:55 -07:00
|
|
|
- (void)didSelectSectionHeader:(UIButton *)button;
|
2015-11-05 16:43:43 -08:00
|
|
|
- (void)didSelectSectionHeaderWithTag:(NSInteger)tag;
|
2011-08-02 09:16:54 -07:00
|
|
|
- (IBAction)selectIntelligence;
|
2013-10-09 15:41:17 -07:00
|
|
|
- (void)markFeedRead:(NSString *)feedId cutoffDays:(NSInteger)days;
|
|
|
|
- (void)markFeedsRead:(NSArray *)feedIds cutoffDays:(NSInteger)days;
|
2015-11-18 13:43:04 -08:00
|
|
|
- (void)markEverythingReadWithDays:(NSInteger)days;
|
2015-11-13 21:54:32 -08:00
|
|
|
- (void)markVisibleStoriesRead;
|
2012-10-03 15:46:02 -07:00
|
|
|
- (void)didCollapseFolder:(UIButton *)button;
|
2012-12-20 12:08:35 -08:00
|
|
|
- (BOOL)isFeedVisible:(id)feedId;
|
2012-08-12 16:50:34 -07:00
|
|
|
- (void)changeToAllMode;
|
2012-12-20 12:08:35 -08:00
|
|
|
- (void)calculateFeedLocations;
|
2011-11-30 18:46:11 -08:00
|
|
|
- (IBAction)sectionTapped:(UIButton *)button;
|
|
|
|
- (IBAction)sectionUntapped:(UIButton *)button;
|
2012-06-26 12:12:31 -07:00
|
|
|
- (IBAction)sectionUntappedOutside:(UIButton *)button;
|
2011-08-27 15:53:51 -07:00
|
|
|
- (void)redrawUnreadCounts;
|
2013-03-28 14:21:14 -07:00
|
|
|
- (void)showExplainerOnEmptyFeedlist;
|
2011-08-02 18:03:11 -07:00
|
|
|
+ (int)computeMaxScoreForFeed:(NSDictionary *)feed;
|
2011-08-04 17:58:28 -07:00
|
|
|
- (void)loadFavicons;
|
2012-06-26 11:45:42 -07:00
|
|
|
- (void)loadAvatars;
|
2012-07-02 11:42:06 -07:00
|
|
|
- (void)refreshFeedList;
|
2012-12-10 20:22:21 -08:00
|
|
|
- (void)refreshFeedList:(id)feedId;
|
2013-10-08 13:57:15 -07:00
|
|
|
- (void)loadOfflineFeeds:(BOOL)failed;
|
2012-07-25 17:29:29 -07:00
|
|
|
- (void)showUserProfile;
|
2013-02-20 17:00:01 -08:00
|
|
|
- (IBAction)showSettingsPopover:(id)sender;
|
2013-02-21 16:53:37 -08:00
|
|
|
- (IBAction)showInteractionsPopover:(id)sender;
|
2012-07-27 19:42:19 -07:00
|
|
|
- (void)fadeSelectedCell;
|
2014-03-21 16:23:51 -07:00
|
|
|
- (void)fadeFeed:(NSString *)feedId;
|
2012-07-31 15:57:56 -07:00
|
|
|
- (IBAction)tapAddSite:(id)sender;
|
|
|
|
|
2012-08-14 17:20:45 -07:00
|
|
|
- (void)resetToolbar;
|
2013-10-17 17:23:52 -07:00
|
|
|
- (void)layoutHeaderCounts:(UIInterfaceOrientation)orientation;
|
2013-02-15 16:41:20 -08:00
|
|
|
- (void)refreshHeaderCounts;
|
2012-08-14 17:20:45 -07:00
|
|
|
|
2013-06-21 17:48:06 -07:00
|
|
|
- (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController*)sender;
|
|
|
|
- (void)settingDidChange:(NSNotification*)notification;
|
|
|
|
|
2013-06-23 22:19:08 -07:00
|
|
|
- (void)showRefreshNotifier;
|
2013-07-15 15:36:25 -07:00
|
|
|
- (void)showCountingNotifier;
|
2013-06-16 21:39:38 -07:00
|
|
|
- (void)showSyncingNotifier;
|
2017-04-11 16:15:18 -07:00
|
|
|
- (void)showSyncingNotifier:(float)progress hoursBack:(NSInteger)days;
|
|
|
|
- (void)showCachingNotifier:(float)progress hoursBack:(NSInteger)hours;
|
2013-06-16 21:39:38 -07:00
|
|
|
- (void)showOfflineNotifier;
|
2013-07-15 15:36:25 -07:00
|
|
|
- (void)showDoneNotifier;
|
2013-06-16 21:39:38 -07:00
|
|
|
- (void)hideNotifier;
|
2010-06-20 11:04:23 -04:00
|
|
|
|
|
|
|
@end
|