Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Moved creating cached preview items to didSelectAttachmentMethod #487

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Classes/BITFeedbackListViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,10 @@ - (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSIn
#pragma mark - ListViewCellDelegate

- (void)listCell:(id) __unused cell didSelectAttachment:(BITFeedbackMessageAttachment *)attachment {
if (!self.cachedPreviewItems){
[self refreshPreviewItems];
}

QLPreviewController *previewController = [[QLPreviewController alloc] init];
previewController.dataSource = self;

Expand All @@ -739,10 +743,6 @@ - (void)refreshPreviewItems {
}

- (NSInteger)numberOfPreviewItemsInPreviewController:(QLPreviewController *) __unused controller {
if (!self.cachedPreviewItems){
[self refreshPreviewItems];
}

return self.cachedPreviewItems.count;
}

Expand Down