2010-06-25 18:36:01 -04:00
|
|
|
//
|
|
|
|
// StoryDetailViewController.h
|
|
|
|
// NewsBlur
|
|
|
|
//
|
|
|
|
// Created by Samuel Clay on 6/24/10.
|
|
|
|
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
2012-10-04 10:59:44 -07:00
|
|
|
#import <QuartzCore/QuartzCore.h>
|
2012-10-17 15:07:53 -07:00
|
|
|
#import "BaseViewController.h"
|
2020-02-23 15:21:32 -08:00
|
|
|
@import WebKit;
|
2010-06-25 18:36:01 -04:00
|
|
|
|
|
|
|
@class NewsBlurAppDelegate;
|
|
|
|
|
2012-10-17 15:07:53 -07:00
|
|
|
@interface StoryDetailViewController : BaseViewController
|
2014-09-18 15:15:41 -07:00
|
|
|
<UIScrollViewDelegate, UIGestureRecognizerDelegate,
|
2020-02-23 15:21:32 -08:00
|
|
|
UIActionSheetDelegate, WKNavigationDelegate> {
|
2016-02-01 10:44:59 -08:00
|
|
|
NewsBlurAppDelegate *appDelegate;
|
|
|
|
|
|
|
|
NSString *activeStoryId;
|
|
|
|
NSMutableDictionary *activeStory;
|
|
|
|
UIView *innerView;
|
2020-02-23 15:21:32 -08:00
|
|
|
WKWebView *webView;
|
2016-02-01 10:44:59 -08:00
|
|
|
NSInteger pageIndex;
|
|
|
|
BOOL pullingScrollview;
|
|
|
|
BOOL inTextView;
|
|
|
|
BOOL inDoubleTap;
|
|
|
|
BOOL hasScrolled;
|
|
|
|
NSURL *activeLongPressUrl;
|
|
|
|
CGSize preRotateSize;
|
|
|
|
CGFloat scrollPct;
|
|
|
|
|
|
|
|
UIInterfaceOrientation _orientation;
|
|
|
|
}
|
2010-06-25 18:36:01 -04:00
|
|
|
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (nonatomic) IBOutlet NewsBlurAppDelegate *appDelegate;
|
|
|
|
@property (nonatomic) NSString *activeStoryId;
|
2013-10-07 10:02:44 -07:00
|
|
|
@property (nonatomic, readwrite) NSMutableDictionary *activeStory;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (nonatomic) IBOutlet UIView *innerView;
|
2020-02-23 15:21:32 -08:00
|
|
|
@property (nonatomic) IBOutlet WKWebView *webView;
|
2012-07-15 15:06:06 -07:00
|
|
|
@property (nonatomic) IBOutlet UIView *feedTitleGradient;
|
2013-09-26 19:26:10 -07:00
|
|
|
@property (nonatomic) IBOutlet UIView *noStoryMessage;
|
2016-01-07 21:12:58 -08:00
|
|
|
@property (nonatomic) IBOutlet UIActivityIndicatorView *activityIndicator;
|
|
|
|
|
2012-10-04 10:59:44 -07:00
|
|
|
@property (nonatomic, assign) BOOL pullingScrollview;
|
2013-05-29 13:36:39 -07:00
|
|
|
@property (nonatomic, assign) BOOL inTextView;
|
2013-10-07 10:02:44 -07:00
|
|
|
@property (nonatomic, assign) BOOL isRecentlyUnread;
|
2015-12-12 15:42:39 -08:00
|
|
|
@property (nonatomic) BOOL hasStory;
|
2018-12-13 08:22:37 -08:00
|
|
|
@property (nonatomic, readonly) BOOL canHideNavigationBar;
|
2019-04-16 20:24:42 -07:00
|
|
|
@property (nonatomic, readonly) BOOL isSinglePage;
|
2013-10-07 10:02:44 -07:00
|
|
|
|
2012-11-05 15:12:42 -08:00
|
|
|
@property NSInteger pageIndex;
|
2012-11-09 14:13:44 -08:00
|
|
|
@property (nonatomic) MBProgressHUD *storyHUD;
|
2012-06-18 14:31:42 -07:00
|
|
|
|
2012-11-08 17:39:32 -08:00
|
|
|
- (void)initStory;
|
2013-09-12 21:26:38 -07:00
|
|
|
- (void)hideNoStoryMessage;
|
2012-11-08 17:39:32 -08:00
|
|
|
- (void)drawStory;
|
2013-03-04 17:15:50 -08:00
|
|
|
- (void)drawStory:(BOOL)force withOrientation:(UIInterfaceOrientation)orientation;
|
2018-10-22 15:14:12 -07:00
|
|
|
- (void)updateStoryTheme;
|
2015-10-02 16:04:49 -07:00
|
|
|
- (void)drawFeedGradient;
|
2012-11-08 17:39:32 -08:00
|
|
|
- (void)showStory;
|
|
|
|
- (void)clearStory;
|
|
|
|
- (void)hideStory;
|
2012-07-25 10:50:52 -07:00
|
|
|
|
2012-07-26 13:54:45 -07:00
|
|
|
- (void)toggleLikeComment:(BOOL)likeComment;
|
2012-12-18 17:29:23 -08:00
|
|
|
- (void)flashCheckmarkHud:(NSString *)messageType;
|
2012-07-30 14:58:57 -07:00
|
|
|
- (void)scrolltoComment;
|
2015-11-21 23:23:37 -05:00
|
|
|
- (void)tryScrollingDown:(BOOL)down;
|
2016-10-05 21:03:32 -07:00
|
|
|
- (void)scrollPageDown:(id)sender;
|
|
|
|
- (void)scrollPageUp:(id)sender;
|
2012-11-07 17:54:16 -08:00
|
|
|
- (void)changeWebViewWidth;
|
2012-07-03 17:54:36 -07:00
|
|
|
- (void)showUserProfile:(NSString *)userId xCoordinate:(int)x yCoordinate:(int)y width:(int)width height:(int)height;
|
2012-11-13 12:28:16 -08:00
|
|
|
- (void)checkTryFeedStory;
|
2012-11-05 17:16:10 -08:00
|
|
|
- (void)setFontStyle:(NSString *)fontStyle;
|
|
|
|
- (void)changeFontSize:(NSString *)fontSize;
|
2014-05-15 18:06:56 -07:00
|
|
|
- (void)changeLineSpacing:(NSString *)lineSpacing;
|
2012-07-30 14:58:57 -07:00
|
|
|
- (void)refreshComments:(NSString *)replyId;
|
2012-11-05 17:16:10 -08:00
|
|
|
|
2012-10-15 09:16:01 -07:00
|
|
|
- (void)openShareDialog;
|
2012-12-27 23:04:25 -08:00
|
|
|
- (void)openTrainingDialog:(int)x yCoordinate:(int)y width:(int)width height:(int)height;
|
2014-11-10 16:00:59 -08:00
|
|
|
- (void)openUserTagsDialog:(int)x yCoordinate:(int)y width:(int)width height:(int)height;
|
2012-08-06 19:21:39 -07:00
|
|
|
- (void)subscribeToBlurblog;
|
2012-11-05 17:16:10 -08:00
|
|
|
- (void)setActiveStoryAtIndex:(NSInteger)activeStoryIndex;
|
2012-12-07 17:18:31 -08:00
|
|
|
- (NSString *)getHeader;
|
2012-08-07 11:27:00 -07:00
|
|
|
- (NSString *)getShareBar;
|
|
|
|
- (NSString *)getComments;
|
2012-06-25 20:28:07 -07:00
|
|
|
- (NSString *)getComment:(NSDictionary *)commentDict;
|
2012-07-20 15:54:10 -07:00
|
|
|
- (NSString *)getReplies:(NSArray *)replies forUserId:(NSString *)commentUserId;
|
2012-08-10 09:45:44 -07:00
|
|
|
- (NSString *)getAvatars:(NSString *)key;
|
2012-12-07 17:18:31 -08:00
|
|
|
- (void)refreshHeader;
|
2014-05-21 12:24:22 -07:00
|
|
|
- (void)refreshSideoptions;
|
2012-08-06 19:21:39 -07:00
|
|
|
|
2016-02-01 10:44:59 -08:00
|
|
|
- (CGPoint)pointForGesture:(UIGestureRecognizer *)gestureRecognizer;
|
|
|
|
|
2015-10-05 11:45:33 -07:00
|
|
|
- (void)showTextOrStoryView;
|
2015-03-10 18:58:23 -07:00
|
|
|
- (void)showStoryView;
|
2013-05-28 18:07:19 -07:00
|
|
|
- (void)fetchTextView;
|
2012-08-06 19:21:39 -07:00
|
|
|
|
2010-06-25 18:36:01 -04:00
|
|
|
@end
|