BF: Crash when leaving settings due to backup section refresh animation.

The exception was:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 10.  The number of rows contained in an existing section after the update (0) must be equal to the number of rows contained in that section before the update (3), plus or minus the number of rows inserted or deleted from that section (0 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).'

To raise this exception:
- Execute the removed code after a delay (2s)
- Enter and leave the settings page
-> Crash
This commit is contained in:
manuroe 2019-07-29 17:31:07 +02:00
parent 436e5f0fa6
commit a5760bc770
2 changed files with 4 additions and 4 deletions

View file

@ -6,6 +6,9 @@ Improvements:
* Soft logout: Support soft logout (#2540).
* Reactions: Emoji picker (#2370).
Bug fix:
* Crash when leaving settings due to backup section refresh animation.
Changes in 0.9.1 (2019-07-17)
===============================================

View file

@ -4269,10 +4269,7 @@ SignOutAlertPresenterDelegate>
- (void)settingsKeyBackupTableViewSectionDidUpdate:(SettingsKeyBackupTableViewSection *)settingsKeyBackupTableViewSection
{
[self.tableView beginUpdates];
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:SETTINGS_SECTION_KEYBACKUP_INDEX]
withRowAnimation:UITableViewRowAnimationAutomatic];
[self.tableView endUpdates];
[self.tableView reloadData];
}
- (MXKTableViewCellWithTextView *)settingsKeyBackupTableViewSection:(SettingsKeyBackupTableViewSection *)settingsKeyBackupTableViewSection textCellForRow:(NSInteger)textCellForRow