Skip to content

Commit 806c24e

Browse files
Michael BeattieAlfredo Uribe
authored andcommitted
[#67863352] associated feeds to feedCells
1 parent c325be5 commit 806c24e

7 files changed

Lines changed: 14 additions & 11 deletions

File tree

EasyReader/Application/Controllers/Menu/CSMenuLeftViewController.m

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,7 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
182182
*/
183183
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
184184
{
185-
if (indexPath.row == [_feeds count])
186-
{
187-
//Add new feed controller change
188-
} else {
189185
[tableView deselectRowAtIndexPath:indexPath animated:YES];
190-
}
191186
}
192187

193188
@end

EasyReader/Application/Controllers/Menu/MenuCells/CSSearchFeedCell.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,16 @@
88

99
#import <UIKit/UIKit.h>
1010
#import "CSEnhancedTableViewCell.h"
11+
#import "Feed.h"
1112

1213
@interface CSSearchFeedCell : CSEnhancedTableViewCell
1314

1415
@property (weak, nonatomic) IBOutlet UIImageView *imageView_icon;
1516
@property (weak, nonatomic) IBOutlet UILabel *label_name;
1617

18+
#pragma mark - Other Properties
19+
20+
/// The feed item this cell is based on
21+
@property (nonatomic, weak) Feed *feed;
22+
1723
@end

EasyReader/Application/Controllers/Menu/MenuCells/CSUserFeedCell.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,16 @@
88

99
#import <UIKit/UIKit.h>
1010
#import "CSEnhancedTableViewCell.h"
11+
#import "Feed.h"
1112

1213
@interface CSUserFeedCell : CSEnhancedTableViewCell
1314

1415
@property (weak, nonatomic) IBOutlet UIImageView *imageView_icon;
1516
@property (weak, nonatomic) IBOutlet UILabel *label_name;
1617

18+
#pragma mark - Other Properties
19+
20+
/// The feed item this cell is based on
21+
@property (nonatomic, weak) Feed *feed;
22+
1723
@end

EasyReader/Application/Controllers/Menu/MenuDataSources/CSMenuSearchFeedDataSource.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
#import <Foundation/Foundation.h>
1010

11-
@class Feed, User, CSEnhancedTableView;
12-
1311
@interface CSMenuSearchFeedDataSource : NSObject<UITableViewDataSource>
1412

1513
@property (nonatomic, retain) NSMutableSet *feeds;

EasyReader/Application/Controllers/Menu/MenuDataSources/CSMenuSearchFeedDataSource.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
7373
CSUserFeedCell *cell = (CSUserFeedCell *)[tableView dequeueReusableCellWithIdentifier:@"SearchFeedCell"];
7474

7575
Feed *feed = [self.feeds allObjects][indexPath.row];
76-
76+
cell.feed = feed;
7777
// Set the label text
7878
cell.label_name.text = feed.name;
7979
cell.label_name.textColor = [UIColor whiteColor];

EasyReader/Application/Controllers/Menu/MenuDataSources/CSMenuUserFeedDataSource.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
#import <Foundation/Foundation.h>
1010

11-
@class Feed, User, CSEnhancedTableView;
12-
1311
@interface CSMenuUserFeedDataSource : NSObject<UITableViewDataSource>
1412

1513
@property (nonatomic, retain) NSMutableSet *feeds;

EasyReader/Application/Controllers/Menu/MenuDataSources/CSMenuUserFeedDataSource.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
7272
CSUserFeedCell *cell = (CSUserFeedCell *)[tableView dequeueReusableCellWithIdentifier:@"UserFeedCell"];
7373

7474
Feed *feed = [self.feeds allObjects][indexPath.row];
75-
75+
cell.feed = feed;
7676
// Set the label text
7777
cell.label_name.text = feed.name;
7878
cell.label_name.textColor = [UIColor whiteColor];

0 commit comments

Comments
 (0)