mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
Merge commit 'f6b85b8f9a0b4ce162616e79045fb015a21b27da' into feature/5004_basis_update_element
* commit 'f6b85b8f9a0b4ce162616e79045fb015a21b27da': (40 commits) finish version++ version++ changelog.d: Upgrade MatrixSDK version ([v0.27.1](https://github.com/matrix-org/matrix-ios-sdk/releases/tag/v0.27.1)). completed code improvement fix 7646 opening the safari web view externally so that it will be able to share the cookies web view opened on tap + changelog added the cell, now I just need to implement the navigation to the web view completed Hide deactivate account if the auth property is present on the WK. Add changelogs Prevent mention crashes when room members are missing display names (objc interop) Prevent pill crashes when room members are missing display names (objc interop) Update introspect to the latest version, remove now duplicate `introspectCollectionView` Prepare for new sprint finish version++ Add missing changelog entry. version++ changelog.d: Upgrade MatrixSDK version ([v0.27.0](https://github.com/matrix-org/matrix-ios-sdk/releases/tag/v0.27.0)). ... # Conflicts: # Config/AppVersion.xcconfig # Podfile # Riot.xcodeproj/xcshareddata/xcschemes/Riot.xcscheme # Riot/Modules/SecureBackup/Setup/SecureBackupSetupCoordinator.swift # Riot/Modules/Settings/SettingsViewController.m # Riot/target.yml
This commit is contained in:
@@ -676,6 +676,52 @@ enum {
|
||||
}
|
||||
|
||||
- (void)removeDevice
|
||||
{
|
||||
MXWellKnownAuthentication *authentication = self.mainSession.homeserverWellknown.authentication;
|
||||
if (authentication)
|
||||
{
|
||||
NSURL *logoutURL = [authentication getLogoutDeviceURLFromID:device.deviceId];
|
||||
if (logoutURL)
|
||||
{
|
||||
[self removeDeviceRedirectWithURL:logoutURL];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self showRemoveDeviceRedirectError];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[self removeDeviceThroughAPI];
|
||||
}
|
||||
}
|
||||
|
||||
-(void) removeDeviceRedirectWithURL: (NSURL * _Nonnull) url
|
||||
{
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle: [VectorL10n manageSessionRedirect] message: nil preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
UIAlertAction *action = [UIAlertAction actionWithTitle:[VectorL10n ok]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler: ^(UIAlertAction * action) {
|
||||
[UIApplication.sharedApplication openURL:url options:@{} completionHandler:^(BOOL success) {
|
||||
if (success && weakSelf)
|
||||
{
|
||||
[weakSelf withdrawViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
}];
|
||||
}];
|
||||
[alert addAction: action];
|
||||
[self presentViewController:alert animated:YES completion:nil];
|
||||
}
|
||||
|
||||
-(void) showRemoveDeviceRedirectError
|
||||
{
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle: [VectorL10n manageSessionRedirectError] message: nil preferredStyle:UIAlertControllerStyleAlert];
|
||||
[self presentViewController:alert animated:YES completion:nil];
|
||||
}
|
||||
|
||||
-(void) removeDeviceThroughAPI
|
||||
{
|
||||
[self startActivityIndicator];
|
||||
self.view.userInteractionEnabled = NO;
|
||||
|
||||
Reference in New Issue
Block a user