mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
fixing mark story as read issues
This commit is contained in:
parent
99ec4180bc
commit
ebd86bf8c6
9 changed files with 22 additions and 17 deletions
|
@ -11,7 +11,6 @@
|
|||
#import "UserProfileViewController.h"
|
||||
#import "ASIHTTPRequest.h"
|
||||
#import "ProfileBadge.h"
|
||||
#import "JSON.h"
|
||||
|
||||
@implementation FriendsListViewController
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#import "InteractionCell.h"
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
#import "ASIHTTPRequest.h"
|
||||
#import "JSON.h"
|
||||
#import "UserProfileViewController.h"
|
||||
|
||||
#define MINIMUM_INTERACTION_HEIGHT 78
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#import "NewsBlurAppDelegate.h"
|
||||
#import "ASIHTTPRequest.h"
|
||||
#import "ASIFormDataRequest.h"
|
||||
#import "JSON.h"
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
@implementation LoginViewController
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#import "NewsBlurAppDelegate.h"
|
||||
#import "ASIHTTPRequest.h"
|
||||
#import "ASIFormDataRequest.h"
|
||||
#import "JSON.h"
|
||||
#import "StringHelper.h"
|
||||
|
||||
@implementation MoveSiteViewController
|
||||
|
|
|
@ -765,7 +765,7 @@
|
|||
NSDictionary *feed;
|
||||
id feedId;;
|
||||
NSString *feedIdStr;
|
||||
NSMutableArray *otherFriendFeeds = [self.activeStory objectForKey:@"shared_by_friends"];
|
||||
NSMutableArray *otherFriendFeeds = [[self.activeStory objectForKey:@"shared_by_friends"] mutableCopy];
|
||||
|
||||
if (self.isSocialView) {
|
||||
feedId = [self.activeStory objectForKey:@"social_user_id"];
|
||||
|
@ -836,10 +836,17 @@
|
|||
|
||||
- (void)markStoryRead:(NSDictionary *)story feed:(NSDictionary *)feed {
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [feed objectForKey:@"id"]];
|
||||
[story setValue:[NSNumber numberWithInt:1] forKey:@"read_status"];
|
||||
|
||||
NSLog(@"feedIdStr is %@", feedIdStr);
|
||||
NSLog(@"story is %@", story);
|
||||
NSLog(@"story is %@", [story class]);
|
||||
NSMutableDictionary *newStory = [story mutableCopy];
|
||||
[newStory setValue:[NSNumber numberWithInt:1] forKey:@"read_status"];
|
||||
|
||||
|
||||
self.visibleUnreadCount -= 1;
|
||||
if (![self.recentlyReadFeeds containsObject:[story objectForKey:@"story_feed_id"]]) {
|
||||
[self.recentlyReadFeeds addObject:[story objectForKey:@"story_feed_id"]];
|
||||
if (![self.recentlyReadFeeds containsObject:[newStory objectForKey:@"story_feed_id"]]) {
|
||||
[self.recentlyReadFeeds addObject:[newStory objectForKey:@"story_feed_id"]];
|
||||
}
|
||||
int score = [NewsBlurAppDelegate computeStoryScore:[story objectForKey:@"intelligence"]];
|
||||
if (score > 0) {
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#import "NewsBlurAppDelegate.h"
|
||||
#import "Utilities.h"
|
||||
#import "ASIHTTPRequest.h"
|
||||
#import "JSON.h"
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
#define kTopBadgeHeight 125
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#import <QuartzCore/QuartzCore.h>
|
||||
#import "Utilities.h"
|
||||
#import "DataUtilities.h"
|
||||
#import "JSON.h"
|
||||
#import "ASIHTTPRequest.h"
|
||||
|
||||
@implementation ShareViewController
|
||||
|
@ -163,15 +162,19 @@
|
|||
NSString *urlString = [NSString stringWithFormat:@"http://%@/social/share_story",
|
||||
NEWSBLUR_URL];
|
||||
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [appDelegate.activeStory objectForKey:@"story_feed_id"]];
|
||||
NSString *storyIdStr = [NSString stringWithFormat:@"%@", [appDelegate.activeStory objectForKey:@"id"]];
|
||||
NSString *sourceUserIdStr = [NSString stringWithFormat:@"%@", [appDelegate.activeStory objectForKey:@"social_user_id"]];
|
||||
|
||||
NSURL *url = [NSURL URLWithString:urlString];
|
||||
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
|
||||
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [appDelegate.activeStory objectForKey:@"story_feed_id"]];
|
||||
NSString *storyIdStr = [NSString stringWithFormat:@"%@", [appDelegate.activeStory objectForKey:@"id"]];
|
||||
|
||||
[request setPostValue:feedIdStr forKey:@"feed_id"];
|
||||
[request setPostValue:storyIdStr forKey:@"story_id"];
|
||||
|
||||
NSLog(@"class is %@", [[appDelegate.activeStory objectForKey:@"social_user_id"] class]);
|
||||
NSLog(@"class is %@", [NSNull class]);
|
||||
NSString *sourceUserIdStr = [NSString stringWithFormat:@"%@", [appDelegate.activeStory objectForKey:@"social_user_id"]];
|
||||
|
||||
if (!([sourceUserIdStr isEqualToString:@"(null)"])) {
|
||||
[request setPostValue:sourceUserIdStr forKey:@"source_user_id"];
|
||||
}
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
#import "ASIFormDataRequest.h"
|
||||
#import "Base64.h"
|
||||
#import "Utilities.h"
|
||||
#import "JSON.h"
|
||||
#import "NSString+HTML.h"
|
||||
#import "NBContainerViewController.h"
|
||||
#import "DataUtilities.h"
|
||||
#import "JSON.h"
|
||||
|
||||
@interface StoryDetailViewController ()
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
// #define BACKGROUND_REFRESH_SECONDS -5
|
||||
#define BACKGROUND_REFRESH_SECONDS -10*60
|
||||
|
||||
// #define NEWSBLUR_URL [NSString stringWithFormat:@"nb.local.host"]
|
||||
#define NEWSBLUR_URL [NSString stringWithFormat:@"dev.newsblur.com"]
|
||||
#define NEWSBLUR_URL [NSString stringWithFormat:@"nb.local.host"]
|
||||
// #define NEWSBLUR_URL [NSString stringWithFormat:@"dev.newsblur.com"]
|
||||
|
||||
#define NEWSBLUR_ORANGE 0xAE5D15
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue