Users must not be allowed to add or otherwise manage widgets in rooms

- Avoid navigation to integration management using integration popup with settings set to integration disabled
This commit is contained in:
Gil Eluard
2021-04-26 20:17:43 +02:00
parent 496ab422dc
commit 0e583ae172
3 changed files with 15 additions and 17 deletions

View File

@@ -78,18 +78,21 @@
}
// Link to the integration manager
alertAction = [UIAlertAction actionWithTitle:NSLocalizedStringFromTable(@"widget_picker_manage_integrations", @"Vector", nil)
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * _Nonnull action)
{
IntegrationManagerViewController *modularVC = [[IntegrationManagerViewController alloc] initForMXSession:self->mxSession
inRoom:self->roomId
screen:kIntegrationManagerMainScreen
widgetId:nil];
if (RiotSettings.shared.roomInfoScreenShowIntegrations)
{
alertAction = [UIAlertAction actionWithTitle:NSLocalizedStringFromTable(@"widget_picker_manage_integrations", @"Vector", nil)
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * _Nonnull action)
{
IntegrationManagerViewController *modularVC = [[IntegrationManagerViewController alloc] initForMXSession:self->mxSession
inRoom:self->roomId
screen:kIntegrationManagerMainScreen
widgetId:nil];
[mxkViewController presentViewController:modularVC animated:NO completion:nil];
}];
[self.alertController addAction:alertAction];
[mxkViewController presentViewController:modularVC animated:NO completion:nil];
}];
[self.alertController addAction:alertAction];
}
// Cancel
alertAction = [UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]