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.
|
|
|
|
//
|
|
|
|
|
2015-11-29 18:08:44 -08:00
|
|
|
#import "NewsBlurAppDelegate.h"
|
2014-02-12 16:39:30 -08:00
|
|
|
|
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-12-02 18:36:38 -08:00
|
|
|
BOOL inSearch;
|
|
|
|
NSString *searchQuery;
|
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;
|
2019-04-24 20:32:04 -07:00
|
|
|
@property (nonatomic, readonly) NSString *activeTitle;
|
2014-02-12 20:09:37 -08:00
|
|
|
@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-10-22 17:03:48 -07:00
|
|
|
@property (nonatomic, readwrite) BOOL isReadView;
|
2014-02-21 12:24:53 -08:00
|
|
|
@property (nonatomic, readwrite) BOOL transferredFromDashboard;
|
2014-12-02 18:36:38 -08:00
|
|
|
@property (nonatomic, readwrite) BOOL inSearch;
|
|
|
|
@property (nonatomic) NSString *searchQuery;
|
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;
|
2015-03-10 18:58:23 -07:00
|
|
|
- (NSString *)activeStoryView;
|
2014-02-12 20:09:37 -08:00
|
|
|
- (NSString *)orderKey;
|
|
|
|
- (NSString *)readFilterKey;
|
2015-03-10 18:58:23 -07:00
|
|
|
- (NSString *)storyViewKey;
|
2014-02-12 20:09:37 -08:00
|
|
|
|
|
|
|
- (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;
|
|
|
|
|
2015-10-25 20:26:49 -07:00
|
|
|
- (NSDictionary *)markStory:(NSDictionary *)story asSaved:(BOOL)saved;
|
|
|
|
- (NSDictionary *)markStory:(NSDictionary *)story asSaved:(BOOL)saved forceUpdate:(BOOL)forceUpdate;
|
2014-03-05 14:13:49 -08:00
|
|
|
- (void)toggleStorySaved;
|
2014-12-16 15:36:58 -08:00
|
|
|
- (BOOL)toggleStorySaved:(NSDictionary *)story;
|
2014-03-05 14:13:49 -08:00
|
|
|
- (void)syncStoryAsSaved:(NSDictionary *)story;
|
|
|
|
- (void)syncStoryAsUnsaved:(NSDictionary *)story;
|
2014-02-12 16:39:30 -08:00
|
|
|
|
|
|
|
@end
|