mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-01 13:46:57 +02:00
MESSENGER-4093 scan permalinks as qr
This commit is contained in:
committed by
Frank Rotermund
parent
1bff461abb
commit
eb618b395d
@@ -1917,6 +1917,28 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
[self performSegueWithIdentifier:@"presentStartChat" sender:self];
|
||||
}
|
||||
|
||||
- (void)scanPermalink {
|
||||
AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
|
||||
if(authStatus == AVAuthorizationStatusDenied) {
|
||||
UIAlertController* alert = [UIAlertController alertControllerWithTitle:BWIL10n.authenticationServerSelectionQrMissingAuthorizationTitle
|
||||
message:BWIL10n.authenticationServerSelectionQrMissingAuthorizationMessage
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* primaryAction = [UIAlertAction actionWithTitle:VectorL10n.settingsTitle style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
[[UIApplication sharedApplication] openURL: [NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
|
||||
}];
|
||||
UIAlertAction* secondaryAction = [UIAlertAction actionWithTitle:VectorL10n.cancel style:UIAlertActionStyleCancel
|
||||
handler:^(UIAlertAction * action) {}];
|
||||
[alert addAction:primaryAction];
|
||||
[alert addAction:secondaryAction];
|
||||
[self presentViewController:alert animated:YES completion:nil];
|
||||
} else {
|
||||
UIViewController* viewController = [PermalinkQRCodeScannerController createFromSwiftUIView];
|
||||
[self presentViewController:viewController animated: YES completion: nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)createNewRoom
|
||||
{
|
||||
// Sanity check
|
||||
|
||||
Reference in New Issue
Block a user