This commit is contained in:
Mauro Romito
2023-08-25 17:22:11 +02:00
parent 070acd436f
commit 2b93d8f03a
3 changed files with 25 additions and 1 deletions
@@ -655,6 +655,20 @@ enum {
}
- (void)removeDevice
{
NSURL *logoutURL = [self.mainSession.homeserverWellknown.authentication getMasLogoutDeviceURLFromDeviceID:device.deviceId];
if (logoutURL)
{
[UIApplication.sharedApplication openURL:logoutURL options:@{} completionHandler:nil];
[self withdrawViewControllerAnimated:YES completion:nil];
}
else
{
[self removeDeviceThroughAPI];
}
}
-(void) removeDeviceThroughAPI
{
[self startActivityIndicator];
self.view.userInteractionEnabled = NO;