Skip to content
This repository has been archived by the owner on Sep 11, 2018. It is now read-only.

Commit

Permalink
Totally anal code formatting fix only
Browse files Browse the repository at this point in the history
  • Loading branch information
rbruels committed Dec 12, 2010
1 parent fea88db commit 8f380d2
Show file tree
Hide file tree
Showing 16 changed files with 44 additions and 23 deletions.
3 changes: 2 additions & 1 deletion Classes/Data/SubredditDataModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#import <Foundation/Foundation.h>
#import "Three20/Three20.h"

@interface SubredditDataModel : TTURLRequestModel {
@interface SubredditDataModel : TTURLRequestModel
{
NSString *_subreddit;
NSMutableArray *_stories;

Expand Down
15 changes: 10 additions & 5 deletions Classes/Data/SubredditDataModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ - (id)initWithSubreddit:(NSString *)subreddit
- (void)load:(TTURLRequestCachePolicy)cachePolicy more:(BOOL)more
{
NSString *loadURL = [self fullURL];
if(more) {
if(more)
{
id object = [self.stories lastObject];

//rb what the fuck is this doing?
Expand All @@ -40,7 +41,9 @@ - (void)load:(TTURLRequestCachePolicy)cachePolicy more:(BOOL)more
NSString *lastItemID = story.name;

loadURL = [NSString stringWithFormat:@"%@%@%@", [self fullURL], MoreItemsFormattedString, lastItemID];
} else {
}
else
{
// clear the cache for this subreddit
//rb sigh... ditch three20 loading asap...
[[TTURLCache sharedCache] removeURL:loadURL fromDisk:YES];
Expand Down Expand Up @@ -96,9 +99,10 @@ - (void)requestDidFinishLoad:(TTURLRequest*)request
}

canLoadMore = [_stories count] > totalCount;
if(canLoadMore) {
if(canLoadMore)
{
//rb testing
[self performSelector:@selector(loadNewRequest:) withObject:request afterDelay:2.0];
//[self performSelector:@selector(loadNewRequest:) withObject:request afterDelay:2.0];
}
[super requestDidFinishLoad:request];
}
Expand Down Expand Up @@ -135,7 +139,8 @@ - (void)invalidate:(BOOL)erase
[self.stories removeAllObjects];
}

- (void)dealloc {
- (void)dealloc
{
TT_RELEASE_SAFELY(_stories);
TT_RELEASE_SAFELY(_subreddit);
[super dealloc];
Expand Down
9 changes: 6 additions & 3 deletions Classes/Data/SubredditDataSource.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ @implementation SubredditDataSource

@synthesize viewController;

- (id)initWithSubreddit:(NSString *)subreddit {
- (id)initWithSubreddit:(NSString *)subreddit
{
if (self = [self init])
{
_subredditModel = [[SubredditDataModel alloc] initWithSubreddit:subreddit];
}
return self;
}

- (id<TTModel>)model {
- (id<TTModel>)model
{
return _subredditModel;
}

Expand All @@ -45,7 +47,8 @@ - (void)dealloc
[super dealloc];
}

- (void)tableViewDidLoadModel:(UITableView*)tableView {
- (void)tableViewDidLoadModel:(UITableView*)tableView
{
[lastLoadedTime release];
lastLoadedTime = [[NSDate date] retain];
self.items = _subredditModel.stories;
Expand Down
3 changes: 2 additions & 1 deletion Classes/Extensions/CDataScanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

// NSScanner

@interface CDataScanner : NSObject {
@interface CDataScanner : NSObject
{
NSData *data;

u_int8_t *start;
Expand Down
3 changes: 2 additions & 1 deletion Classes/Extensions/CJSONDeserializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ extern NSString *const kJSONDeserializerErrorDomain /* = @"CJSONDeserializerErro

#pragma mark -

@interface CJSONDeserializer : NSObject <CDeserializerProtocol> {
@interface CJSONDeserializer : NSObject <CDeserializerProtocol>
{

}

Expand Down
3 changes: 2 additions & 1 deletion Classes/Extensions/CJSONScanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

#import "CDataScanner.h"

@interface CJSONScanner : CDataScanner {
@interface CJSONScanner : CDataScanner
{
}

- (BOOL)scanJSONObject:(id *)outObject error:(NSError **)outError;
Expand Down
3 changes: 2 additions & 1 deletion Classes/Extensions/CJSONSerializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

#import <Foundation/Foundation.h>

@interface CJSONSerializer : NSObject {
@interface CJSONSerializer : NSObject
{
}

+ (id)serializer;
Expand Down
3 changes: 2 additions & 1 deletion Classes/ViewControllers/LoginViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

@end

@interface LoginViewController : TTTableViewController {
@interface LoginViewController : TTTableViewController
{
id <LoginViewControllerDelegate>delegate;
id context;

Expand Down
3 changes: 2 additions & 1 deletion Classes/ViewControllers/MessageViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#import <Foundation/Foundation.h>
#import <Three20/Three20.h>

@interface MessageViewController : TTTableViewController {
@interface MessageViewController : TTTableViewController
{
TTURLRequest *activeRequest;
}

Expand Down
3 changes: 2 additions & 1 deletion Classes/ViewControllers/MessageViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ - (void)didSelectObject:(TTTableItem*)object atIndexPath:(NSIndexPath*)indexPath
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
}

- (void)tableViewDidLoadModel:(UITableView*)tableView {
- (void)tableViewDidLoadModel:(UITableView*)tableView
{
NSLog(@"wut");
}

Expand Down
3 changes: 2 additions & 1 deletion Classes/ViewControllers/RootViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#import <Foundation/Foundation.h>
#import <Three20/Three20.h>

@interface RootViewController : TTTableViewController {
@interface RootViewController : TTTableViewController
{
NSArray *customSubreddits;
TTURLRequest *activeRequest;
}
Expand Down
3 changes: 2 additions & 1 deletion Classes/ViewControllers/SettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
#import "Constants.h"
#import "Three20Extensions.h"

static void settingsSoundPlayedCallback(SystemSoundID mySSID, void* myself) {
static void settingsSoundPlayedCallback(SystemSoundID mySSID, void* myself)
{
AudioServicesRemoveSystemSoundCompletion(mySSID);
AudioServicesDisposeSystemSoundID(mySSID);
}
Expand Down
3 changes: 2 additions & 1 deletion Classes/ViewControllers/SubredditViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ - (void)setViewState:(TTViewState)aState
}
*/

- (void)createModel {
- (void)createModel
{
SubredditDataSource *source = [[SubredditDataSource alloc] initWithSubreddit:subredditItem.URL];
source.viewController = self;
self.dataSource = source;
Expand Down
3 changes: 2 additions & 1 deletion Classes/Views/CommentAccessoryView.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ - (void)setCommentCount:(unsigned)aCount
[self setTitle:[NSString stringWithFormat:@"%u", aCount] forState:UIControlStateNormal];
}

- (void)dealloc {
- (void)dealloc
{
self.story = nil;
[super dealloc];
}
Expand Down
3 changes: 2 additions & 1 deletion Classes/Views/StoryCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#import <Three20/Three20.h>
#import "Story.h"

@interface StoryCell : UITableViewCell {
@interface StoryCell : UITableViewCell
{
Story *story;
UILabel *storyTitleView;
UILabel *storyDescriptionView;
Expand Down
4 changes: 2 additions & 2 deletions main.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#import <UIKit/UIKit.h>

int main(int argc, char *argv[]) {

int main(int argc, char *argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
Expand Down

0 comments on commit 8f380d2

Please sign in to comment.