Bug fix (App crash): Prevent insertion of existing rows at the end of back pagination.

This commit is contained in:
giomfo
2014-12-02 15:27:37 +01:00
parent 8adf17fd9e
commit f3c6d73c82

View File

@@ -784,11 +784,11 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// Check table view members vs messages
if (tableView == self.membersTableView)
{
if (tableView == self.membersTableView) {
return members.count;
}
// Reset here back pagination counter to prevent insertion of existing rows at the end of pagination
backPaginationAddedItemsNb = 0;
return messages.count;
}
@@ -1789,6 +1789,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
MPMoviePlayerController* moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:selectedVideo];
if (moviePlayerController) {
[moviePlayerController setShouldAutoplay:NO];
// TODO requestThumbnailImagesAtTimes
UIImage* videoThumbnail = [moviePlayerController thumbnailImageAtTime:(NSTimeInterval)1 timeOption:MPMovieTimeOptionNearestKeyFrame];
[moviePlayerController stop];
moviePlayerController = nil;