Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Websites categories action causes crash. #562

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 3df4eef5a3f5aeba6a6df642bb5d669cff0662b0


COCOAPODS: 1.15.2
8 changes: 8 additions & 0 deletions ooniprobe/View/Settings/SettingsTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,14 @@ -(IBAction)selectLanguage:(id)sender{
position:CSToastPositionBottom];
}]];
}

// Check if the device is an iPad
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
alert.popoverPresentationController.sourceView = self.view;
alert.popoverPresentationController.sourceRect = CGRectMake(self.view.bounds.size.width, self.view.bounds.size.height, 1.0, 1.0);
alert.popoverPresentationController.permittedArrowDirections = UIPopoverArrowDirectionUp;
}

[self presentViewController:alert animated:YES completion:nil];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ - (IBAction)showListActions:(id)sender {
[SettingsUtility updateAllWebsiteCategories:false];
[self.navigationController popViewControllerAnimated:YES];
}]];

// Check if the device is an iPad
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
alert.popoverPresentationController.sourceView = self.view;
alert.popoverPresentationController.sourceRect = CGRectMake(self.view.bounds.size.width / 2.0, self.view.bounds.size.height / 2.0, 1.0, 1.0);
}

[self presentViewController:alert animated:YES completion:nil];
}

Expand Down
Loading