Skip to content
Permalink
Browse files

Fixing missing folder issue in iOS app. Occurs when user has no feeds…

… in top level, when the Everything psuedo-folder obscures the top folder.
  • Loading branch information...
samuelclay committed Mar 15, 2012
1 parent 99c943b commit 5dd165b4b569437d3d9d4b2afd5fcd92bf1b9c1f
Showing with 11 additions and 6 deletions.
  1. +1 −1 apps/reader/views.py
  2. +8 −3 media/iphone/Classes/NewsBlurViewController.m
  3. +2 −2 media/iphone/NewsBlur_Prefix.pch
@@ -248,7 +248,7 @@ def load_feeds_flat(request):
feeds[sub.feed.pk] = sub.canonical(include_favicon=include_favicons)

folders = json.decode(folders.folders)
flat_folders = {}
flat_folders = {" ": []}

def make_feeds_folder(items, parent_folder="", depth=0):
for item in items:
@@ -237,15 +237,20 @@ - (void)finishLoadingFeedList:(ASIHTTPRequest *)request {
[appDelegate.dictFoldersArray addObject:f];
NSArray *folder = [appDelegate.dictFolders objectForKey:f];
sortedArray = [folder sortedArrayUsingComparator:^NSComparisonResult(id id1, id id2) {
return [[[appDelegate.dictFeeds objectForKey:[NSString stringWithFormat:@"%@", id1]] objectForKey:@"feed_title"]
caseInsensitiveCompare:[[appDelegate.dictFeeds objectForKey:[NSString stringWithFormat:@"%@", id2]] objectForKey:@"feed_title"]];
NSString *feedTitleA = [[appDelegate.dictFeeds
objectForKey:[NSString stringWithFormat:@"%@", id1]]
objectForKey:@"feed_title"];
NSString *feedTitleB = [[appDelegate.dictFeeds
objectForKey:[NSString stringWithFormat:@"%@", id2]]
objectForKey:@"feed_title"];
return [feedTitleA caseInsensitiveCompare:feedTitleB];
}];
[sortedFolders setValue:sortedArray forKey:f];
}

appDelegate.dictFolders = sortedFolders;
[appDelegate.dictFoldersArray sortUsingSelector:@selector(caseInsensitiveCompare:)];

NSLog(@"Folders: %@, Array: %@", appDelegate.dictFolders, appDelegate.dictFoldersArray);
[self calculateFeedLocations:YES];
[self.feedTitlesTable reloadData];

@@ -15,7 +15,7 @@
// #define BACKGROUND_REFRESH_SECONDS -5
#define BACKGROUND_REFRESH_SECONDS -10*60

// #define NEWSBLUR_URL [NSString stringWithFormat:@"nb.local.host:8000"]
#define NEWSBLUR_URL [NSString stringWithFormat:@"www.newsblur.com"]
#define NEWSBLUR_URL [NSString stringWithFormat:@"nb.local.host:8000"]
// #define NEWSBLUR_URL [NSString stringWithFormat:@"www.newsblur.com"]

#endif

0 comments on commit 5dd165b

Please sign in to comment.
You can’t perform that action at this time.