Skip to content

Commit

Permalink
2.9.5-2
Browse files Browse the repository at this point in the history
- Fix iPad issues
  • Loading branch information
BandarHL committed May 5, 2022
1 parent 9edfa53 commit 1d874dc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions BHTwitter/BHTManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ + (void)save:(NSURL *)url {
}
+ (void)showSaveVC:(NSURL *)url {
UIActivityViewController *acVC = [[UIActivityViewController alloc] initWithActivityItems:@[url] applicationActivities:nil];
if (is_iPad()) {
acVC.popoverPresentationController.sourceView = topMostController().view;
acVC.popoverPresentationController.sourceRect = CGRectMake(topMostController().view.bounds.size.width / 2.0, topMostController().view.bounds.size.height / 2.0, 1.0, 1.0);
}
[topMostController() presentViewController:acVC animated:true completion:nil];
}

Expand Down
3 changes: 2 additions & 1 deletion BHTwitter/BHTwitter.xm
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@
%new - (void)copyButtonHandler:(UIButton *)sender {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"hi" message:nil preferredStyle:UIAlertControllerStyleActionSheet];
if (is_iPad()) {
alert.popoverPresentationController.sourceRect = CGRectMake(self.view.bounds.size.width / 2.0, self.view.bounds.size.height / 2.0, 1.0, 1.0);
alert.popoverPresentationController.sourceView = self.view;
alert.popoverPresentationController.sourceRect = sender.frame;
}
UIAlertAction *bio = [UIAlertAction actionWithTitle:@"Copy bio" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
UIPasteboard.generalPasteboard.string = self.viewModel.bio;
Expand Down
2 changes: 1 addition & 1 deletion BHTwitter/Package/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: com.bandarhl.BHTwitter
Name: BHTwitter
Version: 2.9.5-1
Version: 2.9.5-2
Description: Awesome tweak for Twitter
Section: Tweaks
Depends: firmware (>= 13.0), mobilesubstrate
Expand Down

0 comments on commit 1d874dc

Please sign in to comment.