Permalink
Browse files

Fixing misc issues around the everything folder and showing settings …

…in feeds under top level.
  • Loading branch information...
1 parent 90916a3 commit 967b51c521c40ee3310632d3e4d94344def49533 @samuelclay committed Oct 15, 2012
@@ -127,14 +127,16 @@ - (void)viewWillAppear:(BOOL)animated {
if ((appDelegate.isSocialRiverView ||
appDelegate.isSocialView ||
- [appDelegate.activeFolder isEqualToString:@"everything"])) {
+ (appDelegate.isRiverView &&
+ [appDelegate.activeFolder isEqualToString:@"everything"]))) {
settingsButton.enabled = NO;
} else {
settingsButton.enabled = YES;
}
if (appDelegate.isSocialRiverView ||
- [appDelegate.activeFolder isEqualToString:@"everything"]) {
+ (appDelegate.isRiverView &&
+ [appDelegate.activeFolder isEqualToString:@"everything"])) {
feedMarkReadButton.enabled = NO;
} else {
feedMarkReadButton.enabled = YES;
@@ -923,7 +925,7 @@ - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger
int totalUnreadCount = [appDelegate unreadCount];
BOOL showVisible = YES;
BOOL showEntire = YES;
- if ([appDelegate.activeFolder isEqualToString:@"Everything"]) showEntire = NO;
+ 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);
@@ -964,7 +966,7 @@ - (IBAction)doOpenSettingsActionSheet:(id)sender {
} else {
if (self.popoverController == nil) {
self.popoverController = [[WEPopoverController alloc]
- initWithContentViewController:appDelegate.feedDetailMenuViewController];
+ initWithContentViewController:(UIViewController *)appDelegate.feedDetailMenuViewController];
self.popoverController.delegate = self;
} else {
[self.popoverController dismissPopoverAnimated:YES];
@@ -84,13 +84,13 @@ - (void) drawContentView:(CGRect)r highlighted:(BOOL)highlighted {
CGContextBeginPath(context);
CGContextMoveToPoint(context, 0, 0.5f);
- CGContextAddLineToPoint(context, self.bounds.size.width, 0.5f);
+ CGContextAddLineToPoint(context, r.size.width, 0.5f);
CGContextStrokePath(context);
// bottom border
CGContextBeginPath(context);
- CGContextMoveToPoint(context, 0, self.bounds.size.height - 1.5f);
- CGContextAddLineToPoint(context, self.bounds.size.width, self.bounds.size.height - 1.5f);
+ CGContextMoveToPoint(context, 0, r.size.height - .5f);
+ CGContextAddLineToPoint(context, r.size.width, r.size.height - .5f);
CGContextStrokePath(context);
}
@@ -20,8 +20,8 @@ UITableViewDataSource> {
}
@property (nonatomic) IBOutlet NewsBlurAppDelegate *appDelegate;
-@property ( nonatomic) IBOutlet UISegmentedControl *fontStyleSegment;
-@property ( nonatomic) IBOutlet UISegmentedControl *fontSizeSegment;
+@property (nonatomic) IBOutlet UISegmentedControl *fontStyleSegment;
+@property (nonatomic) IBOutlet UISegmentedControl *fontSizeSegment;
@property (nonatomic) IBOutlet UITableView *menuTableView;
- (IBAction)changeFontStyle:(id)sender;
@@ -85,7 +85,7 @@ - (void)viewDidAppear:(BOOL)animated {
- (void)reload {
- BOOL isTopLevel = [[appDelegate.activeFolder trim] isEqualToString:@""];
+ BOOL isTopLevel = [[appDelegate.activeFolder trim] isEqualToString:@""] || appDelegate.activeFolder == @"everything";
int row = 0;
[toFolderInput setText:@""];
@@ -269,7 +269,7 @@ - (void)showFeedDetailMenuPopover:(id)sender {
popoverController.delegate = self;
- [popoverController setPopoverContentSize:CGSizeMake(200, 186)];
+ [popoverController setPopoverContentSize:CGSizeMake(260, 38*3)];
[popoverController presentPopoverFromBarButtonItem:sender
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];
@@ -288,7 +288,7 @@ - (void)showFontSettingsPopover:(id)sender {
popoverController.delegate = self;
- [popoverController setPopoverContentSize:CGSizeMake(274.0, 130.0)];
+ [popoverController setPopoverContentSize:CGSizeMake(240, 228)];
// UIBarButtonItem *settingsButton = [[UIBarButtonItem alloc]
// initWithCustomView:sender];
[popoverController presentPopoverFromBarButtonItem:sender
@@ -825,6 +825,7 @@ - (UnreadCounts *)splitUnreadCountForFolder:(NSString *)folderName {
NSArray *folder;
if ([[self.folderCountCache objectForKey:folderName] boolValue]) {
+ NSLog(@"In folder count cache: %@", folderName);
counts.ps = [[self.folderCountCache objectForKey:[NSString stringWithFormat:@"%@-ps", folderName]] intValue];
counts.nt = [[self.folderCountCache objectForKey:[NSString stringWithFormat:@"%@-nt", folderName]] intValue];
counts.ng = [[self.folderCountCache objectForKey:[NSString stringWithFormat:@"%@-ng", folderName]] intValue];
@@ -856,6 +857,7 @@ - (UnreadCounts *)splitUnreadCountForFolder:(NSString *)folderName {
if (!self.folderCountCache) {
self.folderCountCache = [[NSMutableDictionary alloc] init];
}
+ NSLog(@"Saving to folder cache: %@", folderName);
[self.folderCountCache setObject:[NSNumber numberWithBool:YES] forKey:folderName];
[self.folderCountCache setObject:[NSNumber numberWithInt:counts.ps] forKey:[NSString stringWithFormat:@"%@-ps", folderName]];
[self.folderCountCache setObject:[NSNumber numberWithInt:counts.nt] forKey:[NSString stringWithFormat:@"%@-nt", folderName]];
@@ -1109,7 +1111,8 @@ + (int)computeStoryScore:(NSDictionary *)intelligence {
- (NSString *)extractParentFolderName:(NSString *)folderName {
- if ([folderName containsString:@"Top Level"]) {
+ if ([folderName containsString:@"Top Level"] ||
+ folderName == @"everything") {
folderName = @"";
}
@@ -1124,10 +1127,10 @@ - (NSString *)extractParentFolderName:(NSString *)folderName {
}
- (NSString *)extractFolderName:(NSString *)folderName {
- if ([folderName containsString:@"Top Level"]) {
+ if ([folderName containsString:@"Top Level"] ||
+ folderName == @"everything") {
folderName = @"";
}
-
if ([folderName containsString:@" - "]) {
int folder_loc = [folderName rangeOfString:@" - " options:NSBackwardsSearch].location;
folderName = [folderName substringFromIndex:(folder_loc + 3)];
@@ -23,8 +23,8 @@
#import "UIBarButtonItem+WEPopover.h"
-#define kPhoneTableViewRowHeight 32;
-#define kTableViewRowHeight 32;
+#define kPhoneTableViewRowHeight 31;
+#define kTableViewRowHeight 31;
#define kBlurblogTableViewRowHeight 47;
#define kPhoneBlurblogTableViewRowHeight 39;
static const CGFloat kFolderTitleHeight = 28;
@@ -11,7 +11,6 @@
<string key="NS.object.0">1926</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
- <string>IBNSLayoutConstraint</string>
<string>IBProxyObject</string>
<string>IBUITableView</string>
<string>IBUIView</string>
@@ -121,70 +120,6 @@
<int key="objectID">1</int>
<reference key="object" ref="191373211"/>
<array class="NSMutableArray" key="children">
- <object class="IBNSLayoutConstraint" id="881152300">
- <reference key="firstItem" ref="197528041"/>
- <int key="firstAttribute">4</int>
- <int key="relation">0</int>
- <reference key="secondItem" ref="191373211"/>
- <int key="secondAttribute">4</int>
- <float key="multiplier">1</float>
- <object class="IBLayoutConstant" key="constant">
- <double key="value">0.0</double>
- </object>
- <float key="priority">1000</float>
- <reference key="containingView" ref="191373211"/>
- <int key="scoringType">8</int>
- <float key="scoringTypeFloat">29</float>
- <int key="contentType">3</int>
- </object>
- <object class="IBNSLayoutConstraint" id="176411653">
- <reference key="firstItem" ref="197528041"/>
- <int key="firstAttribute">3</int>
- <int key="relation">0</int>
- <reference key="secondItem" ref="191373211"/>
- <int key="secondAttribute">3</int>
- <float key="multiplier">1</float>
- <object class="IBLayoutConstant" key="constant">
- <double key="value">0.0</double>
- </object>
- <float key="priority">1000</float>
- <reference key="containingView" ref="191373211"/>
- <int key="scoringType">8</int>
- <float key="scoringTypeFloat">29</float>
- <int key="contentType">3</int>
- </object>
- <object class="IBNSLayoutConstraint" id="589667724">
- <reference key="firstItem" ref="197528041"/>
- <int key="firstAttribute">5</int>
- <int key="relation">0</int>
- <reference key="secondItem" ref="191373211"/>
- <int key="secondAttribute">5</int>
- <float key="multiplier">1</float>
- <object class="IBLayoutConstant" key="constant">
- <double key="value">0.0</double>
- </object>
- <float key="priority">1000</float>
- <reference key="containingView" ref="191373211"/>
- <int key="scoringType">8</int>
- <float key="scoringTypeFloat">29</float>
- <int key="contentType">3</int>
- </object>
- <object class="IBNSLayoutConstraint" id="732096994">
- <reference key="firstItem" ref="197528041"/>
- <int key="firstAttribute">6</int>
- <int key="relation">0</int>
- <reference key="secondItem" ref="191373211"/>
- <int key="secondAttribute">6</int>
- <float key="multiplier">1</float>
- <object class="IBLayoutConstant" key="constant">
- <double key="value">0.0</double>
- </object>
- <float key="priority">1000</float>
- <reference key="containingView" ref="191373211"/>
- <int key="scoringType">8</int>
- <float key="scoringTypeFloat">29</float>
- <int key="contentType">3</int>
- </object>
<reference ref="197528041"/>
</array>
<reference key="parent" ref="0"/>
@@ -206,26 +141,6 @@
<array class="NSMutableArray" key="children"/>
<reference key="parent" ref="191373211"/>
</object>
- <object class="IBObjectRecord">
- <int key="objectID">9</int>
- <reference key="object" ref="732096994"/>
- <reference key="parent" ref="191373211"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">10</int>
- <reference key="object" ref="589667724"/>
- <reference key="parent" ref="191373211"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">11</int>
- <reference key="object" ref="176411653"/>
- <reference key="parent" ref="191373211"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">17</int>
- <reference key="object" ref="881152300"/>
- <reference key="parent" ref="191373211"/>
- </object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@@ -234,18 +149,7 @@
<string key="-2.CustomClassName">UIResponder</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <array key="1.IBViewMetadataConstraints">
- <reference ref="732096994"/>
- <reference ref="589667724"/>
- <reference ref="176411653"/>
- <reference ref="881152300"/>
- </array>
- <string key="10.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="11.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="17.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="3.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <boolean value="NO" key="3.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
- <string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
@@ -840,6 +744,7 @@
<string key="fontSizeSegment">UISegmentedControl</string>
<string key="fontStyleSegment">UISegmentedControl</string>
<string key="largeFontSizeLabel">UILabel</string>
+ <string key="menuTableView">UITableView</string>
<string key="smallFontSizeLabel">UILabel</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
@@ -859,6 +764,10 @@
<string key="name">largeFontSizeLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
+ <object class="IBToOneOutletInfo" key="menuTableView">
+ <string key="name">menuTableView</string>
+ <string key="candidateClassName">UITableView</string>
+ </object>
<object class="IBToOneOutletInfo" key="smallFontSizeLabel">
<string key="name">smallFontSizeLabel</string>
<string key="candidateClassName">UILabel</string>
@@ -1141,14 +1050,6 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">NSLayoutConstraint</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">./Classes/NSLayoutConstraint.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
<string key="className">NewsBlurAppDelegate</string>
<string key="superclassName">BaseViewController</string>
<dictionary class="NSMutableDictionary" key="outlets">
@@ -1653,7 +1554,6 @@
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
- <bool key="IBDocument.UseAutolayout">YES</bool>
<string key="IBCocoaTouchPluginVersion">1926</string>
</data>
</archive>
@@ -2,7 +2,7 @@
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1536</int>
- <string key="IBDocument.SystemVersion">12C54</string>
+ <string key="IBDocument.SystemVersion">12C60</string>
<string key="IBDocument.InterfaceBuilderVersion">2840</string>
<string key="IBDocument.AppKitVersion">1187.34</string>
<string key="IBDocument.HIToolboxVersion">625.00</string>
@@ -46,7 +46,6 @@
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{320, 392}</string>
<reference key="NSSuperview" ref="191373211"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="929039419"/>
<object class="NSColor" key="IBUIBackgroundColor" id="544021943">
<int key="NSColorSpace">3</int>
@@ -72,8 +71,6 @@
<int key="NSvFlags">266</int>
<string key="NSFrame">{{0, 392}, {320, 44}}</string>
<reference key="NSSuperview" ref="191373211"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4yMjcwMjkxMjggMC4zNjIxMzU3NzY0IDAuNDU2NTIxNzM5MQA</bytes>
@@ -113,7 +110,6 @@
</object>
<string key="NSFrame">{{0, 44}, {320, 436}}</string>
<reference key="NSSuperview"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="576313732"/>
<reference key="IBUIBackgroundColor" ref="544021943"/>
<object class="IBUISimulatedNavigationBarMetrics" key="IBUISimulatedTopBarMetrics">
Oops, something went wrong.

0 comments on commit 967b51c

Please sign in to comment.