aboutsummaryrefslogtreecommitdiffhomepage
path: root/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m
diff options
context:
space:
mode:
Diffstat (limited to 'example/ios/iOS UI Test/iOS UI Test/MasterViewController.m')
-rw-r--r--example/ios/iOS UI Test/iOS UI Test/MasterViewController.m11
1 files changed, 7 insertions, 4 deletions
diff --git a/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m b/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m
index 1b2528d1..c05fdd9a 100644
--- a/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m
+++ b/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m
@@ -11,6 +11,7 @@
#import "FXKeychain.h"
#import "MCTMsgViewController.h"
#import "GTMOAuth2ViewControllerTouch.h"
+#import "MCTTableViewCell.h"
#define CLIENT_ID @"the-client-id"
#define CLIENT_SECRET @"the-client-secret"
@@ -167,15 +168,17 @@ finishedRefreshWithFetcher:(GTMHTTPFetcher *)fetcher
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
+ MCTTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
MCOIMAPMessage *message = self.messages[indexPath.row];
cell.textLabel.text = message.header.subject;
- MCOIMAPMessageRenderingOperation * op = [self.imapSession plainTextBodyRenderingOperationWithMessage:message
- folder:@"INBOX"];
+ [cell.messageRenderingOperation cancel];
- [op start:^(NSString * htmlString, NSError * error) {
+ cell.messageRenderingOperation = [self.imapSession plainTextBodyRenderingOperationWithMessage:message
+ folder:@"INBOX"];
+
+ [cell.messageRenderingOperation start:^(NSString * htmlString, NSError * error) {
cell.detailTextLabel.text = htmlString;
}];