mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
adding in mark as read for social and fixing bugs
This commit is contained in:
parent
e4019ab43e
commit
fc9b458607
3 changed files with 20 additions and 17 deletions
|
@ -955,12 +955,16 @@
|
|||
|
||||
- (void)markFeedAllRead:(id)feedId {
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@",feedId];
|
||||
NSDictionary *feed = [self.dictFeeds objectForKey:feedIdStr];
|
||||
NSDictionary *feed = self.isSocialView ? [self.dictSocialFeeds objectForKey:feedIdStr] : [self.dictFeeds objectForKey:feedIdStr];
|
||||
|
||||
[feed setValue:[NSNumber numberWithInt:0] forKey:@"ps"];
|
||||
[feed setValue:[NSNumber numberWithInt:0] forKey:@"nt"];
|
||||
[feed setValue:[NSNumber numberWithInt:0] forKey:@"ng"];
|
||||
[self.dictFeeds setValue:feed forKey:feedIdStr];
|
||||
if (self.isSocialView) {
|
||||
[self.dictSocialFeeds setValue:feed forKey:feedIdStr];
|
||||
} else {
|
||||
[self.dictFeeds setValue:feed forKey:feedIdStr];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)calculateStoryLocations {
|
||||
|
|
|
@ -259,10 +259,11 @@
|
|||
[self loadFavicons];
|
||||
|
||||
appDelegate.activeUsername = [results objectForKey:@"user"];
|
||||
//if (appDelegate.feedsViewController.view.window) {
|
||||
|
||||
// set title only if on current controller
|
||||
if (appDelegate.feedsViewController.view.window && [results objectForKey:@"user"]) {
|
||||
[appDelegate setTitle:[results objectForKey:@"user"]];
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
// adding user avatar to left
|
||||
NSString *url = [NSString stringWithFormat:@"%@", [[results objectForKey:@"social_profile"] objectForKey:@"photo_url"]];
|
||||
|
@ -1000,7 +1001,7 @@
|
|||
- (void)loadAvatars {
|
||||
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul);
|
||||
dispatch_async(queue, ^{
|
||||
for (id feed_id in appDelegate.dictSocialFeeds) {
|
||||
for (NSString *feed_id in [appDelegate.dictSocialFeeds allKeys]) {
|
||||
NSDictionary *feed = [appDelegate.dictSocialFeeds objectForKey:feed_id];
|
||||
NSURL *imageURL = [NSURL URLWithString:[feed objectForKey:@"photo_url"]];
|
||||
NSData *imageData = [NSData dataWithContentsOfURL:imageURL];
|
||||
|
|
|
@ -116,9 +116,6 @@
|
|||
|
||||
self.toggleViewButton = toggleButton;
|
||||
|
||||
|
||||
|
||||
|
||||
if (UI_USER_INTERFACE_IDIOM()== UIUserInterfaceIdiomPad) {
|
||||
self.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:originalButton, fontSettingsButton, nil];
|
||||
self.navigationItem.leftBarButtonItem = self.toggleViewButton;
|
||||
|
@ -513,14 +510,15 @@
|
|||
|
||||
- (void)setActiveStory {
|
||||
self.activeStoryId = [appDelegate.activeStory objectForKey:@"id"];
|
||||
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [appDelegate.activeStory objectForKey:@"story_feed_id"]];
|
||||
UIImage *titleImage = appDelegate.isRiverView ?
|
||||
[UIImage imageNamed:@"folder.png"] :
|
||||
[Utilities getImage:feedIdStr];
|
||||
UIImageView *titleImageView = [[UIImageView alloc] initWithImage:titleImage];
|
||||
titleImageView.frame = CGRectMake(0.0, 2.0, 16.0, 16.0);
|
||||
self.navigationItem.titleView = titleImageView;
|
||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
||||
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [appDelegate.activeStory objectForKey:@"story_feed_id"]];
|
||||
UIImage *titleImage = appDelegate.isRiverView ?
|
||||
[UIImage imageNamed:@"folder.png"] :
|
||||
[Utilities getImage:feedIdStr];
|
||||
UIImageView *titleImageView = [[UIImageView alloc] initWithImage:titleImage];
|
||||
titleImageView.frame = CGRectMake(0.0, 2.0, 16.0, 16.0);
|
||||
self.navigationItem.titleView = titleImageView;
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)webView:(UIWebView *)webView
|
||||
|
|
Loading…
Add table
Reference in a new issue