File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99#import " EZRMenuSearchController.h"
1010#import " EZRMenuSearchFeedDataSource.h"
1111#import " EZRMenuUserFeedDataSource.h"
12+ #import " EZRGoogleAnalyticsService.h"
1213#import " Feed.h"
14+ #import " TSMessage.h"
1315
1416
1517NSString * const kEZRFeedSearchStateChangedNotification = @" kEZRFeedSearchStateChanged" ;
@@ -156,6 +158,17 @@ - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
156158 */
157159- (void )searchBarSearchButtonClicked : (UISearchBar *)searchBar
158160{
161+ if ([self isURL: searchBar.text]) {
162+ UIViewController *rootVC = [[[UIApplication sharedApplication ].delegate window ] rootViewController ];
163+
164+ [Feed createFeedWithUrl: searchBar.text success: ^(id responseObject, NSInteger httpStatus) {
165+ [[EZRGoogleAnalyticsService shared ] sendView: @" Feed Added" ];
166+ [TSMessage showNotificationInViewController: rootVC title: @" Easy Reader" subtitle: @" The selected feed has been added to the menu. Please allow a few minutes for new items to populate." type: TSMessageNotificationTypeSuccess];
167+ } failure: ^(id responseObject, NSInteger httpStatus, NSError *error) {
168+ [TSMessage showNotificationInViewController: rootVC title: @" Easy Reader" subtitle: @" There was an error adding that feed. Please try again later." type: TSMessageNotificationTypeError];
169+ }];
170+ }
171+
159172 [self cancelSearch ];
160173}
161174
Original file line number Diff line number Diff line change @@ -440,7 +440,13 @@ - (UIImage *)blurImage:(UIImage*)image
440440
441441 CIImage *result = [blurFilter valueForKey: kCIOutputImageKey ];
442442
443- UIImage *blurredImage = [UIImage imageWithCGImage: [context createCGImage: result fromRect: inputImage.extent] scale: 1.0 orientation: UIImageOrientationDownMirrored];
443+ CGImageRef blurredImageRef = [context createCGImage: result fromRect: inputImage.extent];
444+
445+ UIImage *blurredImage = [UIImage imageWithCGImage: blurredImageRef
446+ scale: 1.0
447+ orientation: UIImageOrientationDownMirrored];
448+
449+ CGImageRelease (blurredImageRef);
444450
445451 return blurredImage;
446452}
Original file line number Diff line number Diff line change @@ -185,8 +185,12 @@ - (AFFailureBlock) translateAFFailureBlock:(APIFailureBlock)failure
185185 {
186186 httpStatus = [error.userInfo[AFNetworkingOperationFailingURLResponseErrorKey] statusCode ];
187187 }
188+ else
189+ {
190+ httpStatus = operation.response .statusCode ;
191+ }
188192
189- failure (operation.responseObject , operation. response . statusCode , error);
193+ failure (operation.responseObject , httpStatus , error);
190194 }
191195 };
192196}
Original file line number Diff line number Diff line change 3636 </dict >
3737 </array >
3838 <key >CFBundleVersion </key >
39- <string >2.0.42 </string >
39+ <string >2.0.43 </string >
4040 <key >LSApplicationCategoryType </key >
4141 <string ></string >
4242 <key >LSRequiresIPhoneOS </key >
You can’t perform that action at this time.
0 commit comments