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-08-04 17:58:28 -07:00
|
|
|
#import "ASIHTTPRequest.h"
|
|
|
|
#import "PullToRefreshView.h"
|
2011-10-27 09:44:58 -07:00
|
|
|
#import "BaseViewController.h"
|
2012-07-31 13:10:26 -07:00
|
|
|
#import "WEPopoverController.h"
|
2010-06-20 11:04:23 -04:00
|
|
|
|
2010-06-21 17:17:26 -04:00
|
|
|
@class NewsBlurAppDelegate;
|
|
|
|
|
2012-06-19 11:48:51 -07:00
|
|
|
@interface NewsBlurViewController : BaseViewController
|
2012-12-20 12:08:35 -08:00
|
|
|
<UITableViewDelegate, UITableViewDataSource,
|
|
|
|
UIAlertViewDelegate, PullToRefreshViewDelegate,
|
|
|
|
ASIHTTPRequestDelegate, NSCacheDelegate,
|
|
|
|
WEPopoverControllerDelegate,
|
|
|
|
UIPopoverControllerDelegate> {
|
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;
|
|
|
|
|
2011-08-04 17:27:31 -07:00
|
|
|
BOOL viewShowingAllFeeds;
|
2011-08-04 17:58:28 -07:00
|
|
|
PullToRefreshView *pull;
|
|
|
|
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
|
|
|
UIView *innerView;
|
|
|
|
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;
|
2012-07-31 13:10:26 -07:00
|
|
|
WEPopoverController *popoverController;
|
|
|
|
Class popoverClass;
|
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;
|
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;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (nonatomic) PullToRefreshView *pull;
|
|
|
|
@property (nonatomic) NSDate *lastUpdate;
|
|
|
|
@property (nonatomic) NSCache *imageCache;
|
|
|
|
@property (nonatomic) IBOutlet UISegmentedControl * intelligenceControl;
|
2012-07-31 13:10:26 -07:00
|
|
|
@property (nonatomic, retain) WEPopoverController *popoverController;
|
2012-07-15 16:46:46 -07:00
|
|
|
@property (nonatomic) NSIndexPath *currentRowAtIndexPath;
|
2012-08-15 19:31:34 -07:00
|
|
|
@property (strong, nonatomic) IBOutlet UIView *noFocusMessage;
|
|
|
|
@property (strong, nonatomic) IBOutlet UIBarButtonItem *toolbarLeftMargin;
|
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;
|
2011-09-05 22:06:31 -07:00
|
|
|
- (void)finishedWithError:(ASIHTTPRequest *)request;
|
|
|
|
- (void)finishLoadingFeedList:(ASIHTTPRequest *)request;
|
2012-06-29 17:37:49 -07:00
|
|
|
- (void)finishRefreshingFeedList:(ASIHTTPRequest *)request;
|
2012-08-02 18:00:48 -07:00
|
|
|
- (void)setUserAvatarLayout:(UIInterfaceOrientation)orientation;
|
2011-10-25 09:47:55 -07:00
|
|
|
- (void)didSelectSectionHeader:(UIButton *)button;
|
2011-08-02 09:16:54 -07:00
|
|
|
- (IBAction)selectIntelligence;
|
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;
|
2011-08-04 17:58:28 -07:00
|
|
|
- (void)saveAndDrawFavicons:(ASIHTTPRequest *)request;
|
|
|
|
- (void)requestFailed:(ASIHTTPRequest *)request;
|
2012-07-02 11:42:06 -07:00
|
|
|
- (void)refreshFeedList;
|
2012-12-10 20:22:21 -08:00
|
|
|
- (void)refreshFeedList:(id)feedId;
|
2011-08-04 17:58:28 -07:00
|
|
|
- (void)pullToRefreshViewShouldRefresh:(PullToRefreshView *)view;
|
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;
|
2011-08-04 17:58:28 -07:00
|
|
|
- (NSDate *)pullToRefreshViewLastUpdated:(PullToRefreshView *)view;
|
2012-07-27 19:42:19 -07:00
|
|
|
- (void)fadeSelectedCell;
|
2012-07-31 15:57:56 -07:00
|
|
|
- (IBAction)tapAddSite:(id)sender;
|
|
|
|
|
2012-08-14 17:20:45 -07:00
|
|
|
- (void)resetToolbar;
|
2013-02-15 16:41:20 -08:00
|
|
|
- (void)refreshHeaderCounts;
|
2013-03-03 15:41:59 -08:00
|
|
|
- (void)refreshHeaderCounts:(UIInterfaceOrientation)orientation;
|
2012-08-14 17:20:45 -07:00
|
|
|
|
2010-06-20 11:04:23 -04:00
|
|
|
|
|
|
|
@end
|