mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Fixing typo in iphone app that preventing mark folder as read when the visible stories option was showing.
This commit is contained in:
parent
c0adece057
commit
fd8f92700e
1 changed files with 38 additions and 40 deletions
|
@ -696,10 +696,45 @@
|
|||
[options release];
|
||||
}
|
||||
|
||||
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
|
||||
// NSLog(@"Action option #%d on %d", buttonIndex, actionSheet.tag);
|
||||
if (actionSheet.tag == 1) {
|
||||
int visibleUnreadCount = appDelegate.visibleUnreadCount;
|
||||
int totalUnreadCount = [appDelegate unreadCount];
|
||||
BOOL showVisible = YES;
|
||||
BOOL showEntire = YES;
|
||||
if ([appDelegate.activeFolder isEqualToString:@"Everything"]) showEntire = NO;
|
||||
if (visibleUnreadCount >= totalUnreadCount || visibleUnreadCount <= 0) showVisible = NO;
|
||||
// NSLog(@"Counts: %d %d = %d", visibleUnreadCount, totalUnreadCount, visibleUnreadCount >= totalUnreadCount || visibleUnreadCount <= 0);
|
||||
|
||||
if (showVisible && showEntire) {
|
||||
if (buttonIndex == 0) {
|
||||
[self markFeedsReadWithAllStories:NO];
|
||||
} else if (buttonIndex == 1) {
|
||||
[self markFeedsReadWithAllStories:YES];
|
||||
}
|
||||
} else if (showVisible && !showEntire) {
|
||||
if (buttonIndex == 0) {
|
||||
[self markFeedsReadWithAllStories:NO];
|
||||
}
|
||||
} else if (!showVisible && showEntire) {
|
||||
if (buttonIndex == 0) {
|
||||
[self markFeedsReadWithAllStories:YES];
|
||||
}
|
||||
}
|
||||
} else if (actionSheet.tag == 2) {
|
||||
if (buttonIndex == 0) {
|
||||
[self confirmDeleteSite];
|
||||
} else if (buttonIndex == 1) {
|
||||
[self openMoveView];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)doOpenSettingsActionSheet {
|
||||
NSString *title = appDelegate.isRiverView ?
|
||||
appDelegate.activeFolder :
|
||||
[appDelegate.activeFeed objectForKey:@"feed_title"];
|
||||
appDelegate.activeFolder :
|
||||
[appDelegate.activeFeed objectForKey:@"feed_title"];
|
||||
UIActionSheet *options = [[UIActionSheet alloc]
|
||||
initWithTitle:title
|
||||
delegate:self
|
||||
|
@ -718,50 +753,13 @@
|
|||
NSString *moveText = @"Move to another folder";
|
||||
[options addButtonWithTitle:moveText];
|
||||
}
|
||||
|
||||
|
||||
options.cancelButtonIndex = [options addButtonWithTitle:@"Cancel"];
|
||||
options.tag = kSettingsActionSheet;
|
||||
[options showInView:self.view];
|
||||
[options release];
|
||||
}
|
||||
|
||||
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
|
||||
// NSLog(@"Action option #%d on %d", buttonIndex, actionSheet.tag);
|
||||
if (actionSheet.tag == 1) {
|
||||
int visibleUnreadCount = appDelegate.visibleUnreadCount;
|
||||
int totalUnreadCount = [appDelegate unreadCount];
|
||||
BOOL showVisible = YES;
|
||||
BOOL showEntire = YES;
|
||||
if ([appDelegate.activeFolder isEqualToString:@"Everything"]) showEntire = NO;
|
||||
if (visibleUnreadCount >= totalUnreadCount || visibleUnreadCount <= 0) showVisible = NO;
|
||||
// NSLog(@"Counts: %d %d = %d", visibleUnreadCount, totalUnreadCount, visibleUnreadCount >= totalUnreadCount || visibleUnreadCount <= 0);
|
||||
|
||||
if (showVisible && showEntire) {
|
||||
if (buttonIndex == 0) {
|
||||
if (buttonIndex == 0) {
|
||||
[self markFeedsReadWithAllStories:NO];
|
||||
} else if (buttonIndex == 1) {
|
||||
[self markFeedsReadWithAllStories:YES];
|
||||
}
|
||||
}
|
||||
} else if (showVisible && !showEntire) {
|
||||
if (buttonIndex == 0) {
|
||||
[self markFeedsReadWithAllStories:NO];
|
||||
}
|
||||
} else if (!showVisible && showEntire) {
|
||||
if (buttonIndex == 0) {
|
||||
[self markFeedsReadWithAllStories:YES];
|
||||
}
|
||||
}
|
||||
} else if (actionSheet.tag == 2) {
|
||||
if (buttonIndex == 0) {
|
||||
[self confirmDeleteSite];
|
||||
} else if (buttonIndex == 1) {
|
||||
[self openMoveView];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)confirmDeleteSite {
|
||||
UIAlertView *deleteConfirm = [[UIAlertView alloc] initWithTitle:@"Positive?" message:nil delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Delete", nil];
|
||||
[deleteConfirm show];
|
||||
|
|
Loading…
Add table
Reference in a new issue