Skip to content

Commit f3ad9c3

Browse files
author
Joey Lorich
committed
Fix merge conflict
2 parents f272357 + 3e78bcc commit f3ad9c3

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

EasyReader/Application/Controllers/Menu/EZRMenuTableViewDelegate.m

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
#import "SVProgressHUD.h"
2222

23+
#import "TSMessage.h"
24+
2325
@interface EZRMenuTableViewDelegate ()
2426

2527
/// The menu search controller
@@ -42,10 +44,12 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
4244
Feed *existingFeed = [Feed MR_findFirstByAttribute:@"id" withValue:feedData[@"id"]];
4345

4446
if (!existingFeed) {
47+
UIViewController *rootVC = [[[UIApplication sharedApplication].delegate window] rootViewController];
48+
4549
[Feed createFeedWithUrl:feedData[@"url"] success:^(id responseObject, NSInteger httpStatus) {
46-
50+
[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];
4751
} failure:^(id responseObject, NSInteger httpStatus, NSError *error) {
48-
52+
[TSMessage showNotificationInViewController:rootVC title:@"Easy Reader" subtitle:@"There was an error adding that feed. Please try again later." type:TSMessageNotificationTypeError];
4953
}];
5054
}
5155
else if (![[User current].feeds containsObject:existingFeed])
@@ -65,6 +69,11 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
6569
[((MFSideMenuContainerViewController *)tableView.window.rootViewController) setMenuState:MFSideMenuStateClosed];
6670
}
6771

72+
/**
73+
* Sends out a kEZRFeedSelected notification
74+
*
75+
* @param feed The feed to notify the selection of
76+
*/
6877
- (void)postSelectedNotificationForFeed:(Feed *)feed
6978
{
7079
NSNotificationCenter *defaultCenter = [NSNotificationCenter defaultCenter];

0 commit comments

Comments
 (0)