Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
[#449] share button is always available on 10.8
Browse files Browse the repository at this point in the history
  • Loading branch information
mackuba committed Mar 29, 2015
1 parent 8d94fb6 commit 5c6f2d2
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions Hive/Controllers/HITransactionPopoverViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,7 @@ - (void)awakeFromNib {

self.targetAddressField.stringValue = self.transaction.targetAddress ?: @"?";

if ([self isSharingSupported]) {
[self configureShareButton];
} else {
[self.shareButton setHidden:YES];
}
[self configureShareButton];
}

- (void)hideField:(NSView *)field {
Expand Down Expand Up @@ -207,10 +203,6 @@ - (NSView *)getWrappingView:(NSView *)view {
return view;
}

- (BOOL)isSharingSupported {
return NSClassFromString(@"NSSharingServicePicker") != nil;
}

- (void)configureShareButton {
[self.shareButton sendActionOn:NSLeftMouseDownMask];

Expand Down Expand Up @@ -322,12 +314,10 @@ - (IBAction)showOnBlockchainInfoClicked:(id)sender {
}

- (IBAction)shareButtonPressed:(NSButton *)sender {
#pragma deploymate push "ignored-api-availability"
NSSharingServicePicker *sharingServicePicker = [[NSSharingServicePicker alloc] initWithItems:@[[self shareText]]];
[sharingServicePicker showRelativeToRect:sender.bounds
ofView:sender
preferredEdge:CGRectMaxXEdge];
#pragma deploymate pop
}

@end

0 comments on commit 5c6f2d2

Please sign in to comment.