Skip to content

Commit

Permalink
Removed shouldRequestAnnotations from ANKClient. Please set this bool…
Browse files Browse the repository at this point in the history
…ean on ANKClient's generalParameters object instead.
  • Loading branch information
joeldev committed Jul 22, 2013
1 parent 7b012a1 commit 3a3ef99
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion ADNKit/ANKClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ typedef void (^ANKClientCompletionBlock)(id responseObject, ANKAPIResponseMeta *
@property (strong) ANKGeneralParameters *generalParameters;
@property (assign) ANKResponseDecodingType responseDecodingType;

@property (assign) BOOL shouldRequestAnnotations; // when yes, annotations will be fetched regardless of the object type
@property (assign) BOOL shouldUseSharedUserDefaultsController; // default NO - uses [NSUserDefaults standardUserDefaults] when NO, [[NSUserDefaultsController sharedUserDefaultsController] defaults] when YES.
@property (assign) BOOL shouldSynchronizeOnUserDefaultsWrite; // default NO - if set to YES, will call synchronize on each write to make sure that user defaults are written to disk immediately

Expand Down
4 changes: 0 additions & 4 deletions ADNKit/ANKClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ - (id)init {
[self registerHTTPOperationClass:[ANKJSONRequestOperation class]];

[self addObserver:self forKeyPath:@"accessToken" options:NSKeyValueObservingOptionNew context:nil];
[self addObserver:self forKeyPath:@"shouldRequestAnnotations" options:NSKeyValueObservingOptionNew context:nil];
}

return self;
Expand All @@ -71,7 +70,6 @@ - (id)init {

- (void)dealloc {
[self removeObserver:self forKeyPath:@"accessToken"];
[self removeObserver:self forKeyPath:@"shouldRequestAnnotations"];
}


Expand All @@ -93,8 +91,6 @@ - (id)copyWithZone:(NSZone *)zone {
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
if ([keyPath isEqualToString:@"accessToken"]) {
[self setDefaultHeader:@"Authorization" value:self.accessToken ? [@"Bearer " stringByAppendingString:self.accessToken] : nil];
} else if ([keyPath isEqualToString:@"shouldRequestAnnotations"]) {
self.generalParameters.includeAnnotations = self.shouldRequestAnnotations;
}
}

Expand Down

3 comments on commit 3a3ef99

@kolinkrewinkel
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidental different account?

@joeldev
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh yes. I hate github.

@kolinkrewinkel
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh. At times, I share that feeling.

Please sign in to comment.