[SettingsViewController] Avoid some crashes when reload rows animated.

This commit is contained in:
SBiOSoftWhare
2019-04-10 14:50:47 +02:00
parent 1fd2200980
commit 414d9d1a6e

View File

@@ -622,12 +622,15 @@ SignOutAlertPresenterDelegate>
dispatch_async(dispatch_get_main_queue(), ^{
[self.tableView beginUpdates];
// Refresh the corresponding table view cell with animation
[self.tableView reloadRowsAtIndexPaths:@[
[NSIndexPath indexPathForRow:userSettingsNewEmailIndex inSection:SETTINGS_SECTION_USER_SETTINGS_INDEX]
]
withRowAnimation:UITableViewRowAnimationFade];
[self.tableView endUpdates];
});
}
}
@@ -648,12 +651,15 @@ SignOutAlertPresenterDelegate>
dispatch_async(dispatch_get_main_queue(), ^{
[self.tableView beginUpdates];
// Refresh the corresponding table view cell with animation
[self.tableView reloadRowsAtIndexPaths:@[
[NSIndexPath indexPathForRow:userSettingsNewPhoneIndex inSection:SETTINGS_SECTION_USER_SETTINGS_INDEX]
]
withRowAnimation:UITableViewRowAnimationFade];
[self.tableView endUpdates];
});
}
}