mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
Scroll to next section if discovery is not ready yet, fixes #3401
This commit is contained in:
@@ -2471,8 +2471,18 @@ SettingsIdentityServerCoordinatorBridgePresenterDelegate>
|
||||
}
|
||||
else if (section == SETTINGS_SECTION_USER_SETTINGS_INDEX && row == userSettingsThreePidsInformation)
|
||||
{
|
||||
NSIndexPath *discoveryIndexPath = [NSIndexPath indexPathForRow:0 inSection:SETTINGS_SECTION_DISCOVERY_INDEX];
|
||||
[tableView scrollToRowAtIndexPath:discoveryIndexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
|
||||
// settingsDiscoveryTableViewSection is a dynamic section, so check number of rows before scroll to avoid crashes
|
||||
if (self.settingsDiscoveryTableViewSection.numberOfRows > 0)
|
||||
{
|
||||
NSIndexPath *discoveryIndexPath = [NSIndexPath indexPathForRow:0 inSection:SETTINGS_SECTION_DISCOVERY_INDEX];
|
||||
[tableView scrollToRowAtIndexPath:discoveryIndexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
|
||||
}
|
||||
else
|
||||
{
|
||||
// this won't be precise in scroll location, but seems the best option for now
|
||||
NSIndexPath *discoveryIndexPath = [NSIndexPath indexPathForRow:0 inSection:SETTINGS_SECTION_DISCOVERY_INDEX + 1];
|
||||
[tableView scrollToRowAtIndexPath:discoveryIndexPath atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
|
||||
}
|
||||
}
|
||||
else if (section == SETTINGS_SECTION_DISCOVERY_INDEX)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user