mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
adding actions to interactions module and fix server everything error
This commit is contained in:
parent
f4cb6e662a
commit
285c5fce38
13 changed files with 1423 additions and 117 deletions
|
@ -40,6 +40,7 @@
|
|||
self.activityLabel = [[[OHAttributedLabel alloc] init] autorelease];
|
||||
self.activityLabel.frame = CGRectMake(10, 10, 280, 120);
|
||||
self.activityLabel.backgroundColor = [UIColor clearColor];
|
||||
self.activityLabel.automaticallyAddLinksForType = NO;
|
||||
|
||||
NSString *category = [activity objectForKey:@"category"];
|
||||
NSString *content = [activity objectForKey:@"content"];
|
||||
|
@ -132,9 +133,24 @@
|
|||
|
||||
// star and feedsub are always private.
|
||||
} else if ([category isEqualToString:@"star"]) {
|
||||
self.activityLabel.text = [NSString stringWithFormat:@"You saved %@", content];
|
||||
NSString *txt = [NSString stringWithFormat:@"%@ saved %@: %@", content];
|
||||
NSMutableAttributedString* attrStr = [NSMutableAttributedString attributedStringWithString:txt];
|
||||
|
||||
[attrStr setFont:[UIFont fontWithName:@"Helvetica" size:14]];
|
||||
[attrStr setTextColor:UIColorFromRGB(0x333333)];
|
||||
|
||||
[attrStr setTextColor:UIColorFromRGB(NEWSBLUR_ORANGE) range:[txt rangeOfString:content]];
|
||||
|
||||
self.activityLabel.attributedText = attrStr;
|
||||
} else if ([category isEqualToString:@"feedsub"]) {
|
||||
self.activityLabel.text = [NSString stringWithFormat:@"You subscribed to %@", content];
|
||||
NSString *txt = [NSString stringWithFormat:@"You subscribed to %@", content];
|
||||
NSMutableAttributedString* attrStr = [NSMutableAttributedString attributedStringWithString:txt];
|
||||
|
||||
[attrStr setFont:[UIFont fontWithName:@"Helvetica" size:14]];
|
||||
[attrStr setTextColor:UIColorFromRGB(0x333333)];
|
||||
|
||||
[attrStr setTextColor:UIColorFromRGB(NEWSBLUR_ORANGE) range:[txt rangeOfString:content]];
|
||||
self.activityLabel.attributedText = attrStr;
|
||||
}
|
||||
|
||||
[self.activityLabel sizeToFit];
|
||||
|
|
|
@ -17,12 +17,14 @@
|
|||
UITableView *activitiesTable;
|
||||
NSArray *activitiesArray;
|
||||
NSString *activitiesUsername;
|
||||
UIPopoverController *popoverController;
|
||||
}
|
||||
|
||||
@property (nonatomic) NewsBlurAppDelegate *appDelegate;
|
||||
@property (nonatomic, strong) UITableView *activitiesTable;
|
||||
@property (nonatomic) NSArray *activitiesArray;
|
||||
@property (nonatomic) NSString *activitiesUsername;
|
||||
@property (nonatomic, strong) UIPopoverController *popoverController;
|
||||
|
||||
- (void)refreshWithActivities:(NSDictionary *)activitiesDict;
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#import "ActivityModule.h"
|
||||
#import "ActivityCell.h"
|
||||
#import "NewsBlurAppDelegate.h"
|
||||
#import "UserProfileViewController.h"
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
@implementation ActivityModule
|
||||
|
@ -17,6 +18,7 @@
|
|||
@synthesize activitiesTable;
|
||||
@synthesize activitiesArray;
|
||||
@synthesize activitiesUsername;
|
||||
@synthesize popoverController;
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame
|
||||
{
|
||||
|
@ -99,6 +101,45 @@
|
|||
return cell;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
int activitiesCount = [self.activitiesArray count];
|
||||
if (indexPath.row < activitiesCount) {
|
||||
NSDictionary *activity = [self.activitiesArray objectAtIndex:indexPath.row];
|
||||
NSString *category = [activity objectForKey:@"category"];
|
||||
if ([category isEqualToString:@"follow"]) {
|
||||
NSString *userId = [[activity objectForKey:@"with_user"] objectForKey:@"user_id"];
|
||||
appDelegate.activeUserProfileId = userId;
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
|
||||
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
|
||||
self.popoverController = [[UIPopoverController alloc] initWithContentViewController:appDelegate.userProfileViewController];
|
||||
[self.popoverController setPopoverContentSize:CGSizeMake(320, 416)];
|
||||
[self.popoverController presentPopoverFromRect:cell.bounds
|
||||
inView:cell
|
||||
permittedArrowDirections:UIPopoverArrowDirectionAny
|
||||
animated:YES];
|
||||
} else if ([category isEqualToString:@"comment_reply"] ||
|
||||
[category isEqualToString:@"comment_like"]) {
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [[activity objectForKey:@"with_user"] objectForKey:@"id"]];
|
||||
NSString *contentIdStr = [NSString stringWithFormat:@"%@", [activity objectForKey:@"content_id"]];
|
||||
[appDelegate loadTryFeedDetailView:feedIdStr withStory:contentIdStr isSocial:YES];
|
||||
} else if ([category isEqualToString:@"sharedstory"]) {
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [[activity objectForKey:@"with_user"] objectForKey:@"id"]];
|
||||
NSString *contentIdStr = [NSString stringWithFormat:@"%@", [activity objectForKey:@"content_id"]];
|
||||
[appDelegate loadTryFeedDetailView:feedIdStr withStory:contentIdStr isSocial:YES];
|
||||
} else if ([category isEqualToString:@"feedsub"]) {
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [activity objectForKey:@"feed_id"]];
|
||||
NSString *contentIdStr = nil;
|
||||
[appDelegate loadTryFeedDetailView:feedIdStr withStory:contentIdStr isSocial:NO];
|
||||
}
|
||||
|
||||
// have the selected cell deselect
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
@ -138,11 +138,15 @@
|
|||
|
||||
appDelegate.dictUserInteractions = [results objectForKey:@"interactions"];
|
||||
|
||||
InteractionsModule *interactions = [[InteractionsModule alloc] init];
|
||||
interactions.frame = CGRectMake(20, 100, 438, 300);
|
||||
[interactions refreshWithInteractions:appDelegate.dictUserInteractions];
|
||||
self.interactionsModule = interactions;
|
||||
[self.view addSubview:self.interactionsModule];
|
||||
if (self.interactionsModule == nil) {
|
||||
InteractionsModule *interactions = [[InteractionsModule alloc] init];
|
||||
interactions.frame = CGRectMake(20, 100, 438, 300);
|
||||
self.interactionsModule = interactions;
|
||||
[self.view addSubview:self.interactionsModule];
|
||||
}
|
||||
|
||||
[self.interactionsModule refreshWithInteractions:appDelegate.dictUserInteractions];
|
||||
|
||||
[self repositionDashboard];
|
||||
}
|
||||
|
||||
|
@ -173,11 +177,15 @@
|
|||
|
||||
appDelegate.dictUserActivities = results;
|
||||
|
||||
ActivityModule *activity = [[ActivityModule alloc] init];
|
||||
activity.frame = CGRectMake(20, 510, 438, 300);
|
||||
[activity refreshWithActivities:appDelegate.dictUserActivities];
|
||||
self.activitiesModule = activity;
|
||||
[self.view addSubview:self.activitiesModule];
|
||||
if (self.activitiesModule == nil) {
|
||||
ActivityModule *activity = [[ActivityModule alloc] init];
|
||||
activity.frame = CGRectMake(20, 510, 438, 300);
|
||||
self.activitiesModule = activity;
|
||||
[self.view addSubview:self.activitiesModule];
|
||||
}
|
||||
|
||||
[self.activitiesModule refreshWithActivities:appDelegate.dictUserActivities];
|
||||
|
||||
[self repositionDashboard];
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -41,7 +41,6 @@
|
|||
<string key="NSFrame">{{270, 449}, {229, 105}}</string>
|
||||
<reference key="NSSuperview" ref="766721923"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
|
@ -61,6 +60,7 @@
|
|||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MSAxIDEAA</bytes>
|
||||
</object>
|
||||
<string key="IBUIShadowOffset">{0, 1}</string>
|
||||
<int key="IBUIBaselineAdjustment">0</int>
|
||||
<float key="IBUIMinimumFontSize">10</float>
|
||||
<int key="IBUITextAlignment">1</int>
|
||||
|
@ -68,11 +68,11 @@
|
|||
<string key="name">Helvetica-Bold</string>
|
||||
<string key="family">Helvetica</string>
|
||||
<int key="traits">2</int>
|
||||
<double key="pointSize">17</double>
|
||||
<double key="pointSize">16</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont">
|
||||
<string key="NSName">Helvetica-Bold</string>
|
||||
<double key="NSSize">17</double>
|
||||
<double key="NSSize">16</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -153,6 +153,14 @@
|
|||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">ActivityModule</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/ActivityModule.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">AddSiteViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
|
@ -297,22 +305,32 @@
|
|||
</object>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="activitesLabel">UILabel</string>
|
||||
<string key="activitiesModule">ActivityModule</string>
|
||||
<string key="appDelegate">NewsBlurAppDelegate</string>
|
||||
<string key="bottomToolbar">UIToolbar</string>
|
||||
<string key="interactionsTable">UITableView</string>
|
||||
<string key="interactionsLabel">UILabel</string>
|
||||
<string key="interactionsModule">InteractionsModule</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="activitesLabel">
|
||||
<string key="name">activitesLabel</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="activitiesModule">
|
||||
<string key="name">activitiesModule</string>
|
||||
<string key="candidateClassName">ActivityModule</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="appDelegate">
|
||||
<string key="name">appDelegate</string>
|
||||
<string key="candidateClassName">NewsBlurAppDelegate</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="bottomToolbar">
|
||||
<string key="name">bottomToolbar</string>
|
||||
<string key="candidateClassName">UIToolbar</string>
|
||||
<object class="IBToOneOutletInfo" key="interactionsLabel">
|
||||
<string key="name">interactionsLabel</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="interactionsTable">
|
||||
<string key="name">interactionsTable</string>
|
||||
<string key="candidateClassName">UITableView</string>
|
||||
<object class="IBToOneOutletInfo" key="interactionsModule">
|
||||
<string key="name">interactionsModule</string>
|
||||
<string key="candidateClassName">InteractionsModule</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
|
@ -648,6 +666,14 @@
|
|||
<string key="minorKey">./Classes/GoogleReaderViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">InteractionsModule</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/InteractionsModule.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">LoginViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
|
@ -1071,8 +1097,8 @@
|
|||
<string key="feedTitlesTable">UITableView</string>
|
||||
<string key="feedViewToolbar">UIToolbar</string>
|
||||
<string key="homeButton">UIBarButtonItem</string>
|
||||
<string key="innerView">UIView</string>
|
||||
<string key="intelligenceControl">UISegmentedControl</string>
|
||||
<string key="popoverController">UIPopoverController</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="appDelegate">
|
||||
|
@ -1095,14 +1121,14 @@
|
|||
<string key="name">homeButton</string>
|
||||
<string key="candidateClassName">UIBarButtonItem</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="innerView">
|
||||
<string key="name">innerView</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="intelligenceControl">
|
||||
<string key="name">intelligenceControl</string>
|
||||
<string key="candidateClassName">UISegmentedControl</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="popoverController">
|
||||
<string key="name">popoverController</string>
|
||||
<string key="candidateClassName">UIPopoverController</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
|
@ -1190,25 +1216,6 @@
|
|||
<string key="minorKey">./Classes/OriginalStoryViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">ProfileBadge</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<string key="NS.key.0">doFollowButton:</string>
|
||||
<string key="NS.object.0">id</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<string key="NS.key.0">doFollowButton:</string>
|
||||
<object class="IBActionInfo" key="NS.object.0">
|
||||
<string key="name">doFollowButton:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/ProfileBadge.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">ShareViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
|
@ -1310,6 +1317,7 @@
|
|||
<string key="buttonNextStory">UIBarButtonItem</string>
|
||||
<string key="buttonPrevious">UIBarButtonItem</string>
|
||||
<string key="feedTitleGradient">UIView</string>
|
||||
<string key="innerView">UIView</string>
|
||||
<string key="progressView">UIProgressView</string>
|
||||
<string key="toggleViewButton">UIBarButtonItem</string>
|
||||
<string key="toolbar">UIToolbar</string>
|
||||
|
@ -1344,6 +1352,10 @@
|
|||
<string key="name">feedTitleGradient</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="innerView">
|
||||
<string key="name">innerView</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="progressView">
|
||||
<string key="name">progressView</string>
|
||||
<string key="candidateClassName">UIProgressView</string>
|
||||
|
@ -1369,30 +1381,6 @@
|
|||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UserProfileViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="appDelegate">NewsBlurAppDelegate</string>
|
||||
<string key="followersCount">UILabel</string>
|
||||
<string key="followingCount">UILabel</string>
|
||||
<string key="profileBadge">ProfileBadge</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="appDelegate">
|
||||
<string key="name">appDelegate</string>
|
||||
<string key="candidateClassName">NewsBlurAppDelegate</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="followersCount">
|
||||
<string key="name">followersCount</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="followingCount">
|
||||
<string key="name">followingCount</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="profileBadge">
|
||||
<string key="name">profileBadge</string>
|
||||
<string key="candidateClassName">ProfileBadge</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UserProfileViewController.h</string>
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
UIBarButtonItem * feedMarkReadButton;
|
||||
UISegmentedControl * intelligenceControl;
|
||||
UIPopoverController *popoverController;
|
||||
BOOL foundTryFeed;
|
||||
}
|
||||
|
||||
@property (nonatomic) IBOutlet NewsBlurAppDelegate *appDelegate;
|
||||
|
@ -46,7 +45,6 @@
|
|||
@property (nonatomic, readwrite) int feedPage;
|
||||
@property (nonatomic, readwrite) BOOL pageFetching;
|
||||
@property (nonatomic, readwrite) BOOL pageFinished;
|
||||
@property (nonatomic, readwrite) BOOL foundTryFeed;
|
||||
|
||||
- (void)resetFeedDetail;
|
||||
- (void)fetchNextPage:(void(^)())callback;
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
@synthesize pageFetching;
|
||||
@synthesize pageFinished;
|
||||
@synthesize intelligenceControl;
|
||||
@synthesize foundTryFeed;
|
||||
|
||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
|
||||
|
||||
|
@ -62,7 +61,6 @@
|
|||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
self.pageFinished = NO;
|
||||
self.foundTryFeed = NO;
|
||||
[MBProgressHUD hideHUDForView:self.view animated:YES];
|
||||
|
||||
if (appDelegate.isRiverView || appDelegate.isSocialView) {
|
||||
|
@ -225,6 +223,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
NSLog(@"appDelegate.activeFolderFeeds is %@", appDelegate.activeFolderFeeds);
|
||||
|
||||
NSString *theFeedDetailURL = [NSString stringWithFormat:
|
||||
@"http://%@/reader/river_stories/?feeds=%@&page=%d&read_stories_count=%d",
|
||||
NEWSBLUR_URL,
|
||||
|
@ -234,6 +234,7 @@
|
|||
|
||||
[self cancelRequests];
|
||||
__weak ASIHTTPRequest *request = [self requestWithURL:theFeedDetailURL];
|
||||
NSLog(@"theFeedDetailURL is %@", theFeedDetailURL);
|
||||
[request setDelegate:self];
|
||||
[request setResponseEncoding:NSUTF8StringEncoding];
|
||||
[request setDefaultResponseEncoding:NSUTF8StringEncoding];
|
||||
|
@ -372,7 +373,7 @@
|
|||
self.pageFetching = NO;
|
||||
|
||||
// test for tryfeed
|
||||
if (appDelegate.isTryFeed && !self.foundTryFeed) {
|
||||
if (appDelegate.inFindingStoryMode && appDelegate.tryFeedStoryId) {
|
||||
for (int i = 0; i < appDelegate.activeFeedStories.count; i++) {
|
||||
NSString *storyIdStr = [[appDelegate.activeFeedStories objectAtIndex:i] objectForKey:@"id"];
|
||||
if ([storyIdStr isEqualToString:appDelegate.tryFeedStoryId]) {
|
||||
|
@ -387,7 +388,7 @@
|
|||
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:locationOfStoryId inSection:0];
|
||||
|
||||
[self.storyTitlesTable selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionBottom];
|
||||
self.foundTryFeed = YES;
|
||||
appDelegate.inFindingStoryMode = NO;
|
||||
|
||||
UITableViewCell *cell = [self.storyTitlesTable cellForRowAtIndexPath:indexPath];
|
||||
[self changeRowStyleToRead:cell];
|
||||
|
@ -583,7 +584,7 @@
|
|||
[self loadStory:cell atRow:location];
|
||||
}
|
||||
|
||||
self.foundTryFeed = YES;
|
||||
appDelegate.inFindingStoryMode = NO;
|
||||
[MBProgressHUD hideHUDForView:appDelegate.splitStoryDetailNavigationController.view animated:YES];
|
||||
}
|
||||
|
||||
|
@ -684,7 +685,7 @@
|
|||
NSInteger maximumOffset = self.storyTitlesTable.contentSize.height - self.storyTitlesTable.frame.size.height;
|
||||
|
||||
if (maximumOffset - currentOffset <= 60.0 ||
|
||||
(appDelegate.isTryFeed && !self.foundTryFeed)) {
|
||||
(appDelegate.inFindingStoryMode)) {
|
||||
if (appDelegate.isRiverView) {
|
||||
[self fetchRiverPage:self.feedPage+1 withCallback:nil];
|
||||
} else {
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
NSString *userId = [[interaction objectForKey:@"with_user"] objectForKey:@"user_id"];
|
||||
appDelegate.activeUserProfileId = userId;
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
|
||||
|
||||
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
|
||||
self.popoverController = [[UIPopoverController alloc] initWithContentViewController:appDelegate.userProfileViewController];
|
||||
[self.popoverController setPopoverContentSize:CGSizeMake(320, 416)];
|
||||
|
@ -122,17 +122,19 @@
|
|||
inView:cell
|
||||
permittedArrowDirections:UIPopoverArrowDirectionAny
|
||||
animated:YES];
|
||||
} else if ([category isEqualToString:@"comment_reply"]) {
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [interaction objectForKey:@"feed_id"]];
|
||||
NSString *contentIdStr = [NSString stringWithFormat:@"%@", [interaction objectForKey:@"content_id"]];
|
||||
[appDelegate loadTryFeedDetailView:feedIdStr withStory:contentIdStr];
|
||||
} else if ([category isEqualToString:@"reply_reply"] ||
|
||||
[category isEqualToString:@"story_reshare"]) {
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [[interaction objectForKey:@"with_user"] objectForKey:@"id"]];
|
||||
NSString *contentIdStr = [NSString stringWithFormat:@"%@", [interaction objectForKey:@"content_id"]];
|
||||
[appDelegate loadTryFeedDetailView:feedIdStr withStory:contentIdStr];
|
||||
}
|
||||
|
||||
} else if ([category isEqualToString:@"comment_reply"]) {
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [interaction objectForKey:@"feed_id"]];
|
||||
NSString *contentIdStr = [NSString stringWithFormat:@"%@", [interaction objectForKey:@"content_id"]];
|
||||
[appDelegate loadTryFeedDetailView:feedIdStr withStory:contentIdStr isSocial:YES];
|
||||
} else if ([category isEqualToString:@"reply_reply"] ||
|
||||
[category isEqualToString:@"story_reshare"]) {
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [[interaction objectForKey:@"with_user"] objectForKey:@"id"]];
|
||||
NSString *contentIdStr = [NSString stringWithFormat:@"%@", [interaction objectForKey:@"content_id"]];
|
||||
[appDelegate loadTryFeedDetailView:feedIdStr withStory:contentIdStr isSocial:YES];
|
||||
}
|
||||
|
||||
// have the selected cell deselect
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
BOOL popoverHasFeedView;
|
||||
BOOL inStoryDetail;
|
||||
BOOL inFeedDetail;
|
||||
BOOL isTryFeed;
|
||||
BOOL inFindingStoryMode;
|
||||
NSString *tryFeedStoryId;
|
||||
NSDictionary * activeFeed;
|
||||
NSString * activeFolder;
|
||||
|
@ -126,7 +126,7 @@
|
|||
@property (readwrite) NSString * activeUserProfileId;
|
||||
@property (nonatomic, readwrite) BOOL isRiverView;
|
||||
@property (nonatomic, readwrite) BOOL isSocialView;
|
||||
@property (nonatomic, readwrite) BOOL isTryFeed;
|
||||
@property (nonatomic, readwrite) BOOL inFindingStoryMode;
|
||||
@property (nonatomic) NSString *tryFeedStoryId;
|
||||
@property (nonatomic, readwrite) BOOL isShowingShare;
|
||||
@property (nonatomic, readwrite) BOOL popoverHasFeedView;
|
||||
|
@ -181,7 +181,7 @@
|
|||
- (void)showAddSite;
|
||||
- (void)showMoveSite;
|
||||
- (void)loadFeedDetailView;
|
||||
- (void)loadTryFeedDetailView:(NSString *)feedId withStory:(NSString *)contentId;
|
||||
- (void)loadTryFeedDetailView:(NSString *)feedId withStory:(NSString *)contentId isSocial:(BOOL)social;
|
||||
- (void)showDashboard;
|
||||
- (void)loadRiverFeedDetailView;
|
||||
- (void)loadStoryDetailView;
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
@synthesize isRiverView;
|
||||
@synthesize isSocialView;
|
||||
@synthesize isShowingShare;
|
||||
@synthesize isTryFeed;
|
||||
@synthesize inFindingStoryMode;
|
||||
@synthesize tryFeedStoryId;
|
||||
@synthesize popoverHasFeedView;
|
||||
@synthesize inStoryDetail;
|
||||
|
@ -409,7 +409,7 @@
|
|||
if ([[self.splitStoryDetailNavigationController viewControllers] containsObject:self.feedDashboardViewController]) {
|
||||
//[self.storyDetailViewController initStory];
|
||||
} else {
|
||||
if (self.isTryFeed) {
|
||||
if (self.inFindingStoryMode) {
|
||||
[self.splitStoryDetailNavigationController pushViewController:self.feedDashboardViewController animated:NO];
|
||||
MBProgressHUD *HUD = [MBProgressHUD showHUDAddedTo:self.splitStoryDetailNavigationController.view animated:YES];
|
||||
HUD.labelText = @"Finding Story...";
|
||||
|
@ -421,13 +421,21 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void)loadTryFeedDetailView:(NSString *)feedId withStory:(NSString *)contentId {
|
||||
- (void)loadTryFeedDetailView:(NSString *)feedId withStory:(NSString *)contentId isSocial:(BOOL)social {
|
||||
|
||||
NSDictionary *feed = [self.dictSocialFeeds objectForKey:feedId];
|
||||
NSDictionary *feed;
|
||||
|
||||
if (social) {
|
||||
feed = [self.dictSocialFeeds objectForKey:feedId];
|
||||
[self setIsSocialView:YES];
|
||||
[self setInFindingStoryMode:YES];
|
||||
} else {
|
||||
feed = [self.dictFeeds objectForKey:feedId];
|
||||
[self setIsSocialView:NO];
|
||||
[self setInFindingStoryMode:NO];
|
||||
}
|
||||
|
||||
[self setTryFeedStoryId:contentId];
|
||||
[self setIsTryFeed:YES];
|
||||
[self setIsSocialView:YES];
|
||||
[self setActiveFeed:feed];
|
||||
[self setActiveFolder:nil];
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
appDelegate.activeFeed = nil;
|
||||
appDelegate.isSocialView = NO;
|
||||
appDelegate.isRiverView = NO;
|
||||
appDelegate.isTryFeed = NO;
|
||||
appDelegate.inFindingStoryMode = NO;
|
||||
[MBProgressHUD hideHUDForView:appDelegate.splitStoryDetailNavigationController.view animated:NO];
|
||||
|
||||
|
||||
|
@ -753,10 +753,12 @@
|
|||
if (button.tag == 1) {
|
||||
[appDelegate setActiveFolder:@"Everything"];
|
||||
for (NSString *folderName in self.activeFeedLocations) {
|
||||
NSArray *originalFolder = [appDelegate.dictFolders objectForKey:folderName];
|
||||
NSArray *folderFeeds = [self.activeFeedLocations objectForKey:folderName];
|
||||
for (int l=0; l < [folderFeeds count]; l++) {
|
||||
[feeds addObject:[originalFolder objectAtIndex:[[folderFeeds objectAtIndex:l] intValue]]];
|
||||
if (![folderName isEqualToString:@""]) { // remove all blurblugs which is a blank folder name
|
||||
NSArray *originalFolder = [appDelegate.dictFolders objectForKey:folderName];
|
||||
NSArray *folderFeeds = [self.activeFeedLocations objectForKey:folderName];
|
||||
for (int l=0; l < [folderFeeds count]; l++) {
|
||||
[feeds addObject:[originalFolder objectAtIndex:[[folderFeeds objectAtIndex:l] intValue]]];
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
|
||||
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
|
||||
|
||||
// #define BACKGROUND_REFRESH_SECONDS -5
|
||||
#define BACKGROUND_REFRESH_SECONDS -10*60
|
||||
#define BACKGROUND_REFRESH_SECONDS -5
|
||||
// #define BACKGROUND_REFRESH_SECONDS -10*60
|
||||
|
||||
// #define NEWSBLUR_URL [NSString stringWithFormat:@"nb.local.host:8000"]
|
||||
#define NEWSBLUR_URL [NSString stringWithFormat:@"dev.newsblur.com"]
|
||||
|
|
Loading…
Add table
Reference in a new issue