2014-02-12 16:39:30 -08:00
|
|
|
//
|
|
|
|
// StoriesCollection.h
|
|
|
|
// NewsBlur
|
|
|
|
//
|
|
|
|
// Created by Samuel Clay on 2/12/14.
|
|
|
|
// Copyright (c) 2014 NewsBlur. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
2014-02-12 20:09:37 -08:00
|
|
|
@interface StoriesCollection : NSObject {
|
|
|
|
NSDictionary * activeFeed;
|
|
|
|
NSString * activeFolder;
|
|
|
|
NSArray * activeFolderFeeds;
|
|
|
|
NSArray * activeFeedStories;
|
|
|
|
NSArray * activeFeedUserProfiles;
|
|
|
|
NSMutableArray * activeFeedStoryLocations;
|
|
|
|
NSMutableArray * activeFeedStoryLocationIds;
|
|
|
|
NSMutableDictionary * activeClassifiers;
|
|
|
|
NSArray * activePopularTags;
|
|
|
|
NSArray * activePopularAuthors;
|
|
|
|
int storyCount;
|
|
|
|
int storyLocationsCount;
|
|
|
|
int visibleUnreadCount;
|
2014-02-27 14:49:33 -08:00
|
|
|
int feedPage;
|
2014-02-12 20:09:37 -08:00
|
|
|
|
|
|
|
BOOL isRiverView;
|
|
|
|
BOOL isSocialView;
|
|
|
|
BOOL isSocialRiverView;
|
2014-02-21 12:24:53 -08:00
|
|
|
BOOL transferredFromDashboard;
|
2014-02-12 20:09:37 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
@property (nonatomic) NewsBlurAppDelegate *appDelegate;
|
|
|
|
@property (readwrite) NSDictionary * activeFeed;
|
2014-05-20 15:29:16 -07:00
|
|
|
@property (nonatomic) NSString * activeSavedStoryTag;
|
2014-02-12 20:09:37 -08:00
|
|
|
@property (readwrite) NSString * activeFolder;
|
|
|
|
@property (readwrite) NSArray * activeFolderFeeds;
|
|
|
|
@property (readwrite) NSArray * activeFeedStories;
|
|
|
|
@property (readwrite) NSArray * activeFeedUserProfiles;
|
|
|
|
@property (readwrite) NSMutableArray * activeFeedStoryLocations;
|
|
|
|
@property (readwrite) NSMutableArray * activeFeedStoryLocationIds;
|
|
|
|
@property (strong, readwrite) NSMutableDictionary * activeClassifiers;
|
|
|
|
@property (strong, readwrite) NSArray * activePopularTags;
|
|
|
|
@property (strong, readwrite) NSArray * activePopularAuthors;
|
|
|
|
@property (readwrite) int storyCount;
|
|
|
|
@property (readwrite) int storyLocationsCount;
|
|
|
|
@property (readwrite) int visibleUnreadCount;
|
2014-02-27 14:49:33 -08:00
|
|
|
@property (nonatomic, readwrite) int feedPage;
|
2014-02-12 20:09:37 -08:00
|
|
|
|
|
|
|
@property (nonatomic, readwrite) BOOL isRiverView;
|
|
|
|
@property (nonatomic, readwrite) BOOL isSocialView;
|
|
|
|
@property (nonatomic, readwrite) BOOL isSocialRiverView;
|
2014-05-20 15:29:16 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL isSavedView;
|
2014-02-21 12:24:53 -08:00
|
|
|
@property (nonatomic, readwrite) BOOL transferredFromDashboard;
|
2014-02-12 20:09:37 -08:00
|
|
|
|
|
|
|
- (id)initForDashboard;
|
2014-02-21 12:24:53 -08:00
|
|
|
- (void)reset;
|
|
|
|
- (void)transferStoriesFromCollection:(StoriesCollection *)fromCollection;
|
2014-02-12 20:09:37 -08:00
|
|
|
|
|
|
|
- (BOOL)isStoryUnread:(NSDictionary *)story;
|
|
|
|
- (void)calculateStoryLocations;
|
|
|
|
- (NSInteger)indexOfNextUnreadStory;
|
|
|
|
- (NSInteger)locationOfNextUnreadStory;
|
|
|
|
- (NSInteger)indexOfNextStory;
|
|
|
|
- (NSInteger)locationOfNextStory;
|
|
|
|
- (NSInteger)indexOfActiveStory;
|
|
|
|
- (NSInteger)indexOfStoryId:(id)storyId;
|
|
|
|
- (NSInteger)locationOfActiveStory;
|
|
|
|
- (NSInteger)indexFromLocation:(NSInteger)location;
|
|
|
|
- (NSInteger)locationOfStoryId:(id)storyId;
|
|
|
|
- (NSString *)activeOrder;
|
|
|
|
- (NSString *)activeReadFilter;
|
|
|
|
- (NSString *)orderKey;
|
|
|
|
- (NSString *)readFilterKey;
|
|
|
|
|
|
|
|
- (void)setStories:(NSArray *)activeFeedStoriesValue;
|
|
|
|
- (void)setFeedUserProfiles:(NSArray *)activeFeedUserProfilesValue;
|
|
|
|
- (void)addStories:(NSArray *)stories;
|
|
|
|
- (void)addFeedUserProfiles:(NSArray *)activeFeedUserProfilesValue;
|
|
|
|
- (void)pushReadStory:(id)storyId;
|
|
|
|
- (id)popReadStory;
|
|
|
|
|
2014-03-05 14:13:49 -08:00
|
|
|
- (void)syncStoryAsRead:(NSDictionary *)story;
|
|
|
|
- (void)syncStoryAsUnread:(NSDictionary *)story;
|
|
|
|
|
|
|
|
- (void)toggleStoryUnread;
|
|
|
|
- (void)toggleStoryUnread:(NSDictionary *)story;
|
|
|
|
- (void)markStoryRead:(NSDictionary *)story;
|
2014-02-20 18:23:58 -08:00
|
|
|
- (void)markStoryRead:(NSString *)storyId feedId:(id)feedId;
|
|
|
|
- (void)markStoryRead:(NSDictionary *)story feed:(NSDictionary *)feed;
|
2014-03-05 14:13:49 -08:00
|
|
|
- (void)markStoryUnread:(NSDictionary *)story;
|
2014-02-20 18:23:58 -08:00
|
|
|
- (void)markStoryUnread:(NSString *)storyId feedId:(id)feedId;
|
|
|
|
- (void)markStoryUnread:(NSDictionary *)story feed:(NSDictionary *)feed;
|
|
|
|
|
2014-03-05 14:13:49 -08:00
|
|
|
- (void)markStory:story asSaved:(BOOL)saved;
|
|
|
|
- (void)toggleStorySaved;
|
|
|
|
- (void)toggleStorySaved:(NSDictionary *)story;
|
|
|
|
- (void)syncStoryAsSaved:(NSDictionary *)story;
|
|
|
|
- (void)finishMarkAsSaved:(ASIFormDataRequest *)request;
|
|
|
|
- (void)failedMarkAsSaved:(ASIFormDataRequest *)request;
|
|
|
|
- (void)syncStoryAsUnsaved:(NSDictionary *)story;
|
|
|
|
- (void)finishMarkAsUnsaved:(ASIFormDataRequest *)request;
|
|
|
|
- (void)failedMarkAsUnsaved:(ASIFormDataRequest *)request;
|
2014-02-12 16:39:30 -08:00
|
|
|
|
|
|
|
@end
|