refactoring get federation status

This commit is contained in:
JanNiklas Grabowski
2024-01-25 17:23:17 +01:00
parent 5b8f7babd5
commit f1e6b04542
5 changed files with 84 additions and 48 deletions
@@ -605,8 +605,23 @@ BOOL reloadToggleCell = false;
[tmpSections addObject:[self sectionForAccessSwitch]];
}
if ( BWIBuildSettings.shared.isFederationEnabled && !mxRoom.isDirect){
[tmpSections addObject:[self sectionForFederationSwitch]];
if (BWIBuildSettings.shared.isFederationEnabled)
{
// Do not show federation settings for DMs
if (!mxRoom.isDirect)
{
// Do not show federation settings for personal note room
if (!mxRoom.isPersonalNotesRoom)
{
// Show federation settings if "isFederated" flag is true (default == true)
[mxRoom getFederatedFlagWithCompletion:^(BOOL isFederated) {
if (isFederated)
{
[tmpSections addObject:[self sectionForFederationSwitch]];
}
}];
}
}
}
if (RiotSettings.shared.roomSettingsScreenAllowChangingHistorySettings)