mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Adding iPhone sized interaction cell. Also fixed infernal race condition between loading stories and looking for try feed when animating in feed detail view controller.
This commit is contained in:
parent
a7e223a1fa
commit
d444161414
17 changed files with 239 additions and 103 deletions
|
@ -70,14 +70,14 @@ def add_site_load_script(request, token):
|
|||
usf = None
|
||||
profile = None;
|
||||
user_profile = None;
|
||||
def image_base64(image_name, path='icons/silk/'):
|
||||
def image_base64(image_name, path='icons/circular/'):
|
||||
image_file = open(os.path.join(settings.MEDIA_ROOT, 'img/%s%s' % (path, image_name)))
|
||||
return base64.b64encode(image_file.read())
|
||||
|
||||
accept_image = image_base64('accept.png')
|
||||
error_image = image_base64('error.png')
|
||||
new_folder_image = image_base64('arrow_down_right.png')
|
||||
add_image = image_base64('add.png')
|
||||
accept_image = image_base64('newuser_icn_setup.png')
|
||||
error_image = image_base64('newuser_icn_sharewith_active.png')
|
||||
new_folder_image = image_base64('g_icn_arrow_right.png')
|
||||
add_image = image_base64('g_icn_expand_hover.png')
|
||||
|
||||
try:
|
||||
profiles = Profile.objects.filter(secret_token=token)
|
||||
|
|
|
@ -156,6 +156,8 @@
|
|||
float: left;
|
||||
margin: 2px 4px 0 0;
|
||||
cursor: pointer;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
.NB-bookmarklet .NB-bookmarklet-new-folder-container {
|
||||
display: none;
|
||||
|
@ -173,8 +175,10 @@
|
|||
width: 156px;
|
||||
}
|
||||
.NB-bookmarklet .NB-bookmarklet-folder-new-label {
|
||||
margin: 4px 4px 0 0;
|
||||
margin: 8px 4px 0 0;
|
||||
float: left;
|
||||
height: 8px;
|
||||
width: 8px;
|
||||
}
|
||||
.NB-bookmarklet .NB-folders {
|
||||
width: 186px;
|
||||
|
|
|
@ -5367,18 +5367,11 @@ form.opml_import_form input {
|
|||
.NB-module-recommended .NB-javascript.NB-recommended-intelligence {
|
||||
opacity: .2;
|
||||
}
|
||||
.NB-module-recommended .NB-recommended-intelligence {
|
||||
margin: 2px 8px 0 0;
|
||||
float: right;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
cursor: pointer;
|
||||
background: transparent url("/media/embed/icons/circular/train.png") no-repeat center center;
|
||||
background-size: 16px;
|
||||
}
|
||||
.NB-module-recommended .NB-recommended-statistics {
|
||||
margin: 2px 0 0 0;
|
||||
float: right;
|
||||
position: absolute;
|
||||
left: -26px;
|
||||
top: 3px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
cursor: pointer;
|
||||
|
@ -5408,6 +5401,7 @@ form.opml_import_form input {
|
|||
margin: 8px 0 0 0;
|
||||
}
|
||||
.NB-module-recommended .NB-recommended-subscribers {
|
||||
position: relative;
|
||||
float: right;
|
||||
text-transform: uppercase;
|
||||
font-size: 11px;
|
||||
|
@ -5421,7 +5415,8 @@ form.opml_import_form input {
|
|||
}
|
||||
.NB-module-recommended .NB-recommended-added {
|
||||
padding: 6px 0 0 20px;
|
||||
background: transparent url('/media/embed/icons/silk/accept.png') no-repeat 0 6px;
|
||||
background: transparent url('/media/embed/icons/circular/newuser_icn_setup.png') no-repeat 0 2px;
|
||||
background-size: 18px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
color: #123B00;
|
||||
|
|
|
@ -261,23 +261,38 @@
|
|||
[appDelegate showUserProfileModal:cell];
|
||||
} 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 withUser:[activity objectForKey:@"with_user"] showFindingStory:YES];
|
||||
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
|
||||
withUser:[activity objectForKey:@"with_user"]
|
||||
showFindingStory:YES];
|
||||
appDelegate.tryFeedCategory = category;
|
||||
} else if ([category isEqualToString:@"sharedstory"]) {
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [appDelegate.dictUserProfile objectForKey:@"id"]];
|
||||
NSString *contentIdStr = [NSString stringWithFormat:@"%@", [activity objectForKey:@"content_id"]];
|
||||
[appDelegate loadTryFeedDetailView:feedIdStr withStory:contentIdStr isSocial:YES withUser:[activity objectForKey:@"with_user"] showFindingStory:YES];
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@",
|
||||
[appDelegate.dictUserProfile objectForKey:@"id"]];
|
||||
NSString *contentIdStr = [NSString stringWithFormat:@"%@",
|
||||
[activity objectForKey:@"content_id"]];
|
||||
[appDelegate loadTryFeedDetailView:feedIdStr
|
||||
withStory:contentIdStr
|
||||
isSocial:YES
|
||||
withUser:[activity objectForKey:@"with_user"]
|
||||
showFindingStory:YES];
|
||||
appDelegate.tryFeedCategory = category;
|
||||
|
||||
} else if ([category isEqualToString:@"feedsub"]) {
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [activity objectForKey:@"feed_id"]];
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@",
|
||||
[activity objectForKey:@"feed_id"]];
|
||||
NSString *contentIdStr = nil;
|
||||
[appDelegate loadTryFeedDetailView:feedIdStr withStory:contentIdStr isSocial:NO withUser:[activity objectForKey:@"with_user"] showFindingStory:NO];
|
||||
[appDelegate loadTryFeedDetailView:feedIdStr
|
||||
withStory:contentIdStr
|
||||
isSocial:NO
|
||||
withUser:[activity objectForKey:@"with_user"]
|
||||
showFindingStory:NO];
|
||||
appDelegate.tryFeedCategory = category;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// have the selected cell deselect
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
int feedPage;
|
||||
BOOL pageFetching;
|
||||
BOOL pageFinished;
|
||||
BOOL finishedAnimatingIn;
|
||||
|
||||
UITableView * storyTitlesTable;
|
||||
UIToolbar * feedViewToolbar;
|
||||
|
@ -50,6 +51,7 @@
|
|||
@property (nonatomic, readwrite) int feedPage;
|
||||
@property (nonatomic, readwrite) BOOL pageFetching;
|
||||
@property (nonatomic, readwrite) BOOL pageFinished;
|
||||
@property (nonatomic, readwrite) BOOL finishedAnimatingIn;
|
||||
|
||||
- (void)resetFeedDetail;
|
||||
- (void)reloadPage;
|
||||
|
@ -57,6 +59,7 @@
|
|||
- (void)fetchFeedDetail:(int)page withCallback:(void(^)())callback;
|
||||
- (void)fetchRiverPage:(int)page withCallback:(void(^)())callback;
|
||||
- (void)finishedLoadingFeed:(ASIHTTPRequest *)request;
|
||||
- (void)testForTryFeed;
|
||||
|
||||
- (void)renderStories:(NSArray *)newStories;
|
||||
- (void)scrollViewDidScroll:(UIScrollView *)scroll;
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
@synthesize pageFinished;
|
||||
@synthesize intelligenceControl;
|
||||
@synthesize actionSheet_;
|
||||
@synthesize finishedAnimatingIn;
|
||||
|
||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
|
||||
|
||||
|
@ -83,6 +84,7 @@
|
|||
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
|
||||
[self setUserAvatarLayout:orientation];
|
||||
|
||||
self.finishedAnimatingIn = NO;
|
||||
self.pageFinished = NO;
|
||||
[MBProgressHUD hideHUDForView:self.view animated:YES];
|
||||
|
||||
|
@ -152,7 +154,7 @@
|
|||
[self.storyTitlesTable reloadData];
|
||||
int location = appDelegate.locationOfActiveStory;
|
||||
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:location inSection:0];
|
||||
if (indexPath) {
|
||||
if (indexPath && location >= 0) {
|
||||
[self.storyTitlesTable selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionMiddle];
|
||||
}
|
||||
[self performSelector:@selector(fadeSelectedCell) withObject:self afterDelay:0.4];
|
||||
|
@ -165,6 +167,9 @@
|
|||
[appDelegate.storyPageControl resetPages];
|
||||
[self checkScroll];
|
||||
}
|
||||
|
||||
self.finishedAnimatingIn = YES;
|
||||
[self testForTryFeed];
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
|
@ -530,8 +535,21 @@
|
|||
}
|
||||
|
||||
self.pageFetching = NO;
|
||||
|
||||
if (self.finishedAnimatingIn) {
|
||||
[self testForTryFeed];
|
||||
}
|
||||
|
||||
// test for tryfeed
|
||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||
[appDelegate.masterContainerViewController syncNextPreviousButtons];
|
||||
}
|
||||
|
||||
[self performSelector:@selector(checkScroll)
|
||||
withObject:nil
|
||||
afterDelay:5.2];
|
||||
}
|
||||
|
||||
- (void)testForTryFeed {
|
||||
if (appDelegate.inFindingStoryMode && appDelegate.tryFeedStoryId) {
|
||||
for (int i = 0; i < appDelegate.activeFeedStories.count; i++) {
|
||||
NSString *storyIdStr = [[appDelegate.activeFeedStories objectAtIndex:i] objectForKey:@"id"];
|
||||
|
@ -545,26 +563,18 @@
|
|||
}
|
||||
int locationOfStoryId = [appDelegate locationOfStoryId:storyIdStr];
|
||||
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:locationOfStoryId inSection:0];
|
||||
|
||||
|
||||
[self.storyTitlesTable selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionBottom];
|
||||
|
||||
FeedDetailTableCell *cell = (FeedDetailTableCell *)[self.storyTitlesTable cellForRowAtIndexPath:indexPath];
|
||||
[self loadStory:cell atRow:indexPath.row];
|
||||
|
||||
// found the story, reset the two flags.
|
||||
// appDelegate.tryFeedStoryId = nil;
|
||||
// appDelegate.tryFeedStoryId = nil;
|
||||
appDelegate.inFindingStoryMode = NO;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||
[appDelegate.masterContainerViewController syncNextPreviousButtons];
|
||||
}
|
||||
|
||||
[self performSelector:@selector(checkScroll)
|
||||
withObject:nil
|
||||
afterDelay:0.2];
|
||||
}
|
||||
|
||||
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
|
||||
|
|
|
@ -12,10 +12,20 @@
|
|||
@interface InteractionCell : UITableViewCell {
|
||||
OHAttributedLabel *interactionLabel;
|
||||
UIImageView *avatarView;
|
||||
int topMargin;
|
||||
int bottomMargin;
|
||||
int leftMargin;
|
||||
int rightMargin;
|
||||
int avatarSize;
|
||||
}
|
||||
|
||||
@property (retain, nonatomic) OHAttributedLabel *interactionLabel;
|
||||
@property (retain, nonatomic) UIImageView *avatarView;
|
||||
@property (readwrite) int topMargin;
|
||||
@property (readwrite) int bottomMargin;
|
||||
@property (readwrite) int leftMargin;
|
||||
@property (readwrite) int rightMargin;
|
||||
@property (readwrite) int avatarSize;
|
||||
|
||||
- (int)setInteraction:(NSDictionary *)interaction withWidth:(int)width;
|
||||
- (NSString *)stripFormatting:(NSString *)str;
|
||||
|
|
|
@ -14,6 +14,11 @@
|
|||
|
||||
@synthesize interactionLabel;
|
||||
@synthesize avatarView;
|
||||
@synthesize topMargin;
|
||||
@synthesize bottomMargin;
|
||||
@synthesize leftMargin;
|
||||
@synthesize rightMargin;
|
||||
@synthesize avatarSize;
|
||||
|
||||
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
|
||||
|
@ -35,18 +40,18 @@
|
|||
UIView *myBackView = [[UIView alloc] initWithFrame:self.frame];
|
||||
myBackView.backgroundColor = UIColorFromRGB(NEWSBLUR_HIGHLIGHT_COLOR);
|
||||
self.selectedBackgroundView = myBackView;
|
||||
|
||||
topMargin = 15;
|
||||
bottomMargin = 15;
|
||||
leftMargin = 20;
|
||||
rightMargin = 20;
|
||||
avatarSize = 48;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)layoutSubviews {
|
||||
#define topMargin 15
|
||||
#define bottomMargin 15
|
||||
#define leftMargin 20
|
||||
#define rightMargin 20
|
||||
#define avatarSize 48
|
||||
|
||||
- (void)layoutSubviews {
|
||||
[super layoutSubviews];
|
||||
|
||||
// determine outer bounds
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#import "InteractionsModule.h"
|
||||
#import "NewsBlurAppDelegate.h"
|
||||
#import "InteractionCell.h"
|
||||
#import "SmallInteractionCell.h"
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
#import "ASIHTTPRequest.h"
|
||||
#import "UserProfileViewController.h"
|
||||
|
@ -177,7 +178,12 @@
|
|||
return MINIMUM_INTERACTION_HEIGHT;
|
||||
}
|
||||
|
||||
InteractionCell *interactionCell = [[InteractionCell alloc] init];
|
||||
InteractionCell *interactionCell;
|
||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||
interactionCell = [[InteractionCell alloc] init];
|
||||
} else {
|
||||
interactionCell = [[SmallInteractionCell alloc] init];
|
||||
}
|
||||
int height = [interactionCell setInteraction:[appDelegate.userInteractionsArray objectAtIndex:(indexPath.row)] withWidth:self.frame.size.width - 20] + 30;
|
||||
if (height < MINIMUM_INTERACTION_HEIGHT) {
|
||||
return MINIMUM_INTERACTION_HEIGHT;
|
||||
|
@ -199,10 +205,14 @@
|
|||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
InteractionCell *cell = [tableView
|
||||
InteractionCell *cell = [tableView
|
||||
dequeueReusableCellWithIdentifier:@"InteractionCell"];
|
||||
if (cell == nil) {
|
||||
cell = [[InteractionCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"InteractionCell"];
|
||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||
cell = [[InteractionCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"InteractionCell"];
|
||||
} else {
|
||||
cell = [[SmallInteractionCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"InteractionCell"];
|
||||
}
|
||||
}
|
||||
|
||||
if (indexPath.row >= [appDelegate.userInteractionsArray count]) {
|
||||
|
|
|
@ -485,6 +485,9 @@
|
|||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
||||
[self.navigationController popToRootViewControllerAnimated:NO];
|
||||
[self.navigationController dismissModalViewControllerAnimated:YES];
|
||||
if (self.feedsViewController.popoverController) {
|
||||
[self.feedsViewController.popoverController dismissPopoverAnimated:NO];
|
||||
}
|
||||
}
|
||||
|
||||
NSDictionary *feed = nil;
|
||||
|
|
13
media/ios/Classes/SmallInteractionCell.h
Normal file
13
media/ios/Classes/SmallInteractionCell.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
//
|
||||
// SmallInteractionCell.h
|
||||
// NewsBlur
|
||||
//
|
||||
// Created by Samuel Clay on 2/21/13.
|
||||
// Copyright (c) 2013 NewsBlur. All rights reserved.
|
||||
//
|
||||
|
||||
#import "InteractionCell.h"
|
||||
|
||||
@interface SmallInteractionCell : InteractionCell
|
||||
|
||||
@end
|
67
media/ios/Classes/SmallInteractionCell.m
Normal file
67
media/ios/Classes/SmallInteractionCell.m
Normal file
|
@ -0,0 +1,67 @@
|
|||
//
|
||||
// SmallInteractionCell.m
|
||||
// NewsBlur
|
||||
//
|
||||
// Created by Samuel Clay on 2/21/13.
|
||||
// Copyright (c) 2013 NewsBlur. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SmallInteractionCell.h"
|
||||
#import "NSAttributedString+Attributes.h"
|
||||
#import "UIImageView+AFNetworking.h"
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
@implementation SmallInteractionCell
|
||||
|
||||
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
interactionLabel = nil;
|
||||
avatarView = nil;
|
||||
|
||||
// create favicon and label in view
|
||||
UIImageView *favicon = [[UIImageView alloc] initWithFrame:CGRectZero];
|
||||
self.avatarView = favicon;
|
||||
[self.contentView addSubview:favicon];
|
||||
|
||||
OHAttributedLabel *interaction = [[OHAttributedLabel alloc] initWithFrame:CGRectZero];
|
||||
interaction.backgroundColor = [UIColor whiteColor];
|
||||
interaction.automaticallyAddLinksForType = NO;
|
||||
self.interactionLabel = interaction;
|
||||
[self.contentView addSubview:interaction];
|
||||
|
||||
topMargin = 10;
|
||||
bottomMargin = 10;
|
||||
leftMargin = 10;
|
||||
rightMargin = 10;
|
||||
avatarSize = 32;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)layoutSubviews {
|
||||
[super layoutSubviews];
|
||||
|
||||
// determine outer bounds
|
||||
CGRect contentRect = self.contentView.bounds;
|
||||
|
||||
// position avatar to bounds
|
||||
self.avatarView.frame = CGRectMake(leftMargin, topMargin, avatarSize, avatarSize);
|
||||
|
||||
// position label to bounds
|
||||
CGRect labelRect = contentRect;
|
||||
labelRect.origin.x = labelRect.origin.x + leftMargin + avatarSize + leftMargin;
|
||||
labelRect.origin.y = labelRect.origin.y + topMargin - 1;
|
||||
labelRect.size.width = contentRect.size.width - leftMargin - avatarSize - leftMargin - rightMargin;
|
||||
labelRect.size.height = contentRect.size.height - topMargin - bottomMargin;
|
||||
self.interactionLabel.frame = labelRect;
|
||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||
self.interactionLabel.backgroundColor = UIColorFromRGB(0xd7dadf);
|
||||
} else {
|
||||
self.interactionLabel.backgroundColor = UIColorFromRGB(0xf6f6f6);
|
||||
}
|
||||
self.interactionLabel.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
|
||||
@end
|
|
@ -231,7 +231,7 @@
|
|||
return cell;
|
||||
} else if(indexPath.section == 1) {
|
||||
SmallActivityCell *cell = [tableView
|
||||
dequeueReusableCellWithIdentifier:@"ActivityCellIdentifier"];
|
||||
dequeueReusableCellWithIdentifier:@"ActivityCellIdentifier"];
|
||||
if (cell == nil) {
|
||||
cell = [[SmallActivityCell alloc]
|
||||
initWithStyle:UITableViewCellStyleDefault
|
||||
|
@ -245,8 +245,8 @@
|
|||
|
||||
return cell;
|
||||
} else {
|
||||
FollowGrid *cell = [tableView
|
||||
dequeueReusableCellWithIdentifier:@"FollowGridCellIdentifier"];
|
||||
FollowGrid *cell = [tableView
|
||||
dequeueReusableCellWithIdentifier:@"FollowGridCellIdentifier"];
|
||||
if (cell == nil) {
|
||||
cell = [[FollowGrid alloc]
|
||||
initWithStyle:UITableViewCellStyleDefault
|
||||
|
@ -266,39 +266,63 @@
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
if (indexPath.row < activitiesCount) {
|
||||
NSDictionary *activity = [self.activitiesArray objectAtIndex:indexPath.row];
|
||||
NSString *category = [activity objectForKey:@"category"];
|
||||
if ([category isEqualToString:@"follow"]) {
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
|
||||
NSString *userId = [NSString stringWithFormat:@"%@", [[activity objectForKey:@"with_user"] objectForKey:@"user_id"]];
|
||||
NSString *userId = [NSString stringWithFormat:@"%@",
|
||||
[[activity objectForKey:@"with_user"] objectForKey:@"user_id"]];
|
||||
appDelegate.activeUserProfileId = userId;
|
||||
|
||||
NSString *username = [NSString stringWithFormat:@"%@", [[activity objectForKey:@"with_user"] objectForKey:@"username"]];
|
||||
NSString *username = [NSString stringWithFormat:@"%@",
|
||||
[[activity objectForKey:@"with_user"] objectForKey:@"username"]];
|
||||
appDelegate.activeUserProfileName = username;
|
||||
|
||||
[appDelegate pushUserProfile];
|
||||
} else if ([category isEqualToString:@"comment_reply"]) {
|
||||
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 withUser:[activity objectForKey:@"with_user"] showFindingStory:YES];
|
||||
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
|
||||
withUser:[activity objectForKey:@"with_user"]
|
||||
showFindingStory:YES];
|
||||
appDelegate.tryFeedCategory = category;
|
||||
} else if ([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 withUser:self.userProfile showFindingStory:YES];
|
||||
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
|
||||
withUser:self.userProfile
|
||||
showFindingStory:YES];
|
||||
appDelegate.tryFeedCategory = category;
|
||||
} else if ([category isEqualToString:@"sharedstory"]) {
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [self.userProfile objectForKey:@"id"]];
|
||||
NSString *contentIdStr = [NSString stringWithFormat:@"%@", [activity objectForKey:@"content_id"]];
|
||||
[appDelegate loadTryFeedDetailView:feedIdStr withStory:contentIdStr isSocial:YES withUser:self.userProfile showFindingStory:YES];
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@",
|
||||
[self.userProfile objectForKey:@"id"]];
|
||||
NSString *contentIdStr = [NSString stringWithFormat:@"%@",
|
||||
[activity objectForKey:@"content_id"]];
|
||||
[appDelegate loadTryFeedDetailView:feedIdStr
|
||||
withStory:contentIdStr
|
||||
isSocial:YES
|
||||
withUser:self.userProfile
|
||||
showFindingStory:YES];
|
||||
appDelegate.tryFeedCategory = category;
|
||||
} else if ([category isEqualToString:@"feedsub"]) {
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [activity objectForKey:@"feed_id"]];
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@",
|
||||
[activity objectForKey:@"feed_id"]];
|
||||
NSString *contentIdStr = nil;
|
||||
[appDelegate loadTryFeedDetailView:feedIdStr withStory:contentIdStr isSocial:NO withUser:self.userProfile showFindingStory:NO];
|
||||
[appDelegate loadTryFeedDetailView:feedIdStr
|
||||
withStory:contentIdStr
|
||||
isSocial:NO
|
||||
withUser:self.userProfile
|
||||
showFindingStory:NO];
|
||||
}
|
||||
|
||||
// have the selected cell deselect
|
||||
|
|
|
@ -289,6 +289,7 @@
|
|||
78FC34FC11CA94900055C312 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 78FC34F611CA94900055C312 /* SBJsonWriter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
|
||||
FF1660C816D6E9A700AF8541 /* DashboardViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = FF1660C716D6E9A700AF8541 /* DashboardViewController.xib */; };
|
||||
FF1660CA16D6E9B400AF8541 /* DashboardViewController~ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = FF1660C916D6E9B400AF8541 /* DashboardViewController~ipad.xib */; };
|
||||
FF1660CD16D6FD8A00AF8541 /* SmallInteractionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = FF1660CC16D6FD8A00AF8541 /* SmallInteractionCell.m */; };
|
||||
FF2D8B331487250200057B80 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF2D8B321487250200057B80 /* Security.framework */; };
|
||||
FF2D8B351487250C00057B80 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF2D8B341487250C00057B80 /* MessageUI.framework */; };
|
||||
FF2D8C191487EFF000057B80 /* DefaultSHKConfigurator.m in Sources */ = {isa = PBXBuildFile; fileRef = FF2D8B4B1487EFF000057B80 /* DefaultSHKConfigurator.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
|
||||
|
@ -773,6 +774,8 @@
|
|||
8D1107310486CEB800E47090 /* NewsBlur-iPhone-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "NewsBlur-iPhone-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
|
||||
FF1660C716D6E9A700AF8541 /* DashboardViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DashboardViewController.xib; sourceTree = "<group>"; };
|
||||
FF1660C916D6E9B400AF8541 /* DashboardViewController~ipad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = "DashboardViewController~ipad.xib"; path = "Resources-iPad/Classes/DashboardViewController~ipad.xib"; sourceTree = "<group>"; };
|
||||
FF1660CB16D6FD8A00AF8541 /* SmallInteractionCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmallInteractionCell.h; sourceTree = "<group>"; };
|
||||
FF1660CC16D6FD8A00AF8541 /* SmallInteractionCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SmallInteractionCell.m; sourceTree = "<group>"; };
|
||||
FF2D8B321487250200057B80 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
||||
FF2D8B341487250C00057B80 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; };
|
||||
FF2D8B4A1487EFF000057B80 /* DefaultSHKConfigurator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DefaultSHKConfigurator.h; sourceTree = "<group>"; };
|
||||
|
@ -1468,12 +1471,14 @@
|
|||
437F974A15ACA0ED0007136B /* DashboardViewController.m */,
|
||||
437F977015AE70E30007136B /* InteractionsModule.h */,
|
||||
437F977115AE70E30007136B /* InteractionsModule.m */,
|
||||
43ABBCA815B53A1400EA3111 /* InteractionCell.h */,
|
||||
43ABBCA915B53A1400EA3111 /* InteractionCell.m */,
|
||||
437F976D15AE21280007136B /* ActivityModule.h */,
|
||||
437F976E15AE21280007136B /* ActivityModule.m */,
|
||||
43ABBCA815B53A1400EA3111 /* InteractionCell.h */,
|
||||
43ABBCA915B53A1400EA3111 /* InteractionCell.m */,
|
||||
43F6A79B15B0CDC60092EE91 /* ActivityCell.h */,
|
||||
43F6A79C15B0CDC60092EE91 /* ActivityCell.m */,
|
||||
FF1660CB16D6FD8A00AF8541 /* SmallInteractionCell.h */,
|
||||
FF1660CC16D6FD8A00AF8541 /* SmallInteractionCell.m */,
|
||||
4383DCD415BB8B87007E6611 /* SmallActivityCell.h */,
|
||||
4383DCD515BB8B88007E6611 /* SmallActivityCell.m */,
|
||||
);
|
||||
|
@ -2427,6 +2432,7 @@
|
|||
FF4130A3162E10CF00DDB6A7 /* MenuTableViewCell.m in Sources */,
|
||||
FF6A233216448E0700E15989 /* StoryPageControl.m in Sources */,
|
||||
FF67D3B2168924C40057A7DA /* TrainerViewController.m in Sources */,
|
||||
FF1660CD16D6FD8A00AF8541 /* SmallInteractionCell.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
@ -2,34 +2,6 @@
|
|||
<Bucket
|
||||
type = "1"
|
||||
version = "1.0">
|
||||
<FileBreakpoints>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Classes/StoryPageControl.m"
|
||||
timestampString = "383167041.119447"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "300"
|
||||
endingLineNumber = "300"
|
||||
landmarkName = "-applyNewIndex:pageController:"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Classes/NewsBlurAppDelegate.m"
|
||||
timestampString = "382658030.023776"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "693"
|
||||
endingLineNumber = "693"
|
||||
landmarkName = "-recalculateIntelligenceScores:"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
</FileBreakpoints>
|
||||
<SymbolicBreakpoints>
|
||||
<SymbolicBreakpoint
|
||||
shouldBeEnabled = "Yes"
|
||||
|
|
|
@ -3135,8 +3135,8 @@
|
|||
left = toplevel ? 2 : -22;
|
||||
top = toplevel ? 1 : 3;
|
||||
} else if (type == 'socialfeed') {
|
||||
left = 1;
|
||||
top = 1;
|
||||
left = 2;
|
||||
top = 2;
|
||||
} else if (type == 'folder') {
|
||||
left = toplevel ? 0 : -21;
|
||||
top = toplevel ? 3 : 3;
|
||||
|
@ -3165,8 +3165,8 @@
|
|||
top = toplevel ? 20 : 19;
|
||||
$align = $('.NB-feedlist-manage-icon', $item);
|
||||
} else if (type == 'socialfeed') {
|
||||
left = toplevel ? 2 : -18;
|
||||
top = toplevel ? 21 : 21;
|
||||
left = toplevel ? 0 : -18;
|
||||
top = toplevel ? 20 : 21;
|
||||
$align = $('.NB-feedlist-manage-icon', $item);
|
||||
} else if (type == 'folder') {
|
||||
left = toplevel ? 0 : -22;
|
||||
|
|
|
@ -33,14 +33,13 @@
|
|||
</h5>
|
||||
|
||||
<div class="NB-recommended" data-feed-id="{{ recommended_feed.feed_id }}">
|
||||
<div class="NB-recommended-statistics NB-javascript"></div>
|
||||
<div class="NB-recommended-intelligence NB-javascript"></div>
|
||||
<img class="NB-recommended-favicon" src="data:image/png;base64,{{ feed_icon.data }}" />
|
||||
<div class="NB-recommended-title">{{ recommended_feed.feed.feed_title }}</div>
|
||||
{# <div class="NB-recommended-link">{{ recommended_feed.feed.feed_link }}</div> #}
|
||||
<div class="NB-recommended-description">{{ description|safe }}</div>
|
||||
<div class="NB-modal-submit">
|
||||
<div class="NB-recommended-subscribers">
|
||||
<div class="NB-recommended-statistics NB-javascript"></div>
|
||||
<b>{{ recommended_feed.feed.num_subscribers|commify }}</b> subscriber{{ recommended_feed.feed.num_subscribers|pluralize }}
|
||||
<br />
|
||||
<b>{{ recommended_feed.feed.average_stories_per_month }}</b> {{ recommended_feed.feed.average_stories_per_month|pluralize:"story,stories" }} per month
|
||||
|
|
Loading…
Add table
Reference in a new issue