|
|
|
@ -94,7 +94,7 @@
|
|
|
|
|
[fullLabelString addAttribute:NSForegroundColorAttributeName value:[UIColor blackColor] range:NSMakeRange(0,firstLine.length)];
|
|
|
|
|
[fullLabelString addAttribute:NSForegroundColorAttributeName value:[UIColor ows_darkGrayColor] range:NSMakeRange(firstLine.length + 1, secondLine.length)];
|
|
|
|
|
label.attributedText = fullLabelString;
|
|
|
|
|
//250, 66, 140
|
|
|
|
|
//250, 66, 140
|
|
|
|
|
[label setFrame:CGRectMake([self marginSize], 100+140, [self contentWidth], 66)];
|
|
|
|
|
return label;
|
|
|
|
|
}
|
|
|
|
@ -299,10 +299,10 @@
|
|
|
|
|
confirmMessage = [confirmMessage stringByAppendingString:NSLocalizedString(@"QUESTIONMARK_PUNCTUATION", @"")];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
__block UIAlertController *alertController = [UIAlertController
|
|
|
|
|
UIAlertController *alertController = [UIAlertController
|
|
|
|
|
alertControllerWithTitle:NSLocalizedString(@"CONFIRMATION_TITLE", @"")
|
|
|
|
|
message:confirmMessage
|
|
|
|
|
preferredStyle:UIAlertControllerStyleAlert];
|
|
|
|
|
message:confirmMessage
|
|
|
|
|
preferredStyle:UIAlertControllerStyleAlert];
|
|
|
|
|
|
|
|
|
|
UIAlertAction *cancelAction = [UIAlertAction
|
|
|
|
|
actionWithTitle:NSLocalizedString(@"Cancel", @"")
|
|
|
|
@ -314,31 +314,36 @@
|
|
|
|
|
|
|
|
|
|
UIAlertAction *okAction = [UIAlertAction
|
|
|
|
|
actionWithTitle:NSLocalizedString(@"OK", @"")
|
|
|
|
|
style:UIAlertActionStyleDefault
|
|
|
|
|
handler:^(UIAlertAction *action) {
|
|
|
|
|
[self.searchController setActive:NO];
|
|
|
|
|
|
|
|
|
|
UIDevice *device = [UIDevice currentDevice];
|
|
|
|
|
if ([[device model] isEqualToString:@"iPhone"]) {
|
|
|
|
|
MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init];
|
|
|
|
|
picker.messageComposeDelegate = self;
|
|
|
|
|
|
|
|
|
|
picker.recipients = [currentSearchTerm length]> 0 ? [NSArray arrayWithObject:currentSearchTerm] : nil;
|
|
|
|
|
picker.body = [NSLocalizedString(@"SMS_INVITE_BODY", @"") stringByAppendingString:@" https://itunes.apple.com/us/app/signal-private-messenger/id874139669?mt=8"];
|
|
|
|
|
[self presentViewController:picker animated:YES completion:[UIUtil modalCompletionBlock]];
|
|
|
|
|
} else {
|
|
|
|
|
// TODO: better backup for iPods (just don't support on)
|
|
|
|
|
UIAlertView *notPermitted=[[UIAlertView alloc] initWithTitle:@"" message:NSLocalizedString(@"UNSUPPORTED_FEATURE_ERROR", @"") delegate:nil cancelButtonTitle:NSLocalizedString(@"OK", @"") otherButtonTitles:nil];
|
|
|
|
|
[notPermitted show];
|
|
|
|
|
}
|
|
|
|
|
}];
|
|
|
|
|
style:UIAlertActionStyleDefault
|
|
|
|
|
handler:^(UIAlertAction *action) {
|
|
|
|
|
[self.searchController setActive:NO];
|
|
|
|
|
|
|
|
|
|
UIDevice *device = [UIDevice currentDevice];
|
|
|
|
|
if ([[device model] isEqualToString:@"iPhone"]) {
|
|
|
|
|
MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init];
|
|
|
|
|
picker.messageComposeDelegate = self;
|
|
|
|
|
|
|
|
|
|
picker.recipients = [currentSearchTerm length]> 0 ? [NSArray arrayWithObject:currentSearchTerm] : nil;
|
|
|
|
|
picker.body = [NSLocalizedString(@"SMS_INVITE_BODY", @"") stringByAppendingString:@" https://itunes.apple.com/us/app/signal-private-messenger/id874139669?mt=8"];
|
|
|
|
|
[self presentViewController:picker animated:YES completion:[UIUtil modalCompletionBlock]];
|
|
|
|
|
} else {
|
|
|
|
|
// TODO: better backup for iPods (just don't support on)
|
|
|
|
|
UIAlertView *notPermitted=[[UIAlertView alloc] initWithTitle:@"" message:NSLocalizedString(@"UNSUPPORTED_FEATURE_ERROR", @"") delegate:nil cancelButtonTitle:NSLocalizedString(@"OK", @"") otherButtonTitles:nil];
|
|
|
|
|
[notPermitted show];
|
|
|
|
|
}
|
|
|
|
|
}];
|
|
|
|
|
|
|
|
|
|
[alertController addAction:cancelAction];
|
|
|
|
|
[alertController addAction:okAction];
|
|
|
|
|
sendTextButton.hidden = YES;
|
|
|
|
|
self.searchController.searchBar.text = @"";
|
|
|
|
|
|
|
|
|
|
[self presentViewController:alertController animated:YES completion:[UIUtil modalCompletionBlock]];
|
|
|
|
|
[self dismissViewControllerAnimated:YES
|
|
|
|
|
completion:nil];
|
|
|
|
|
|
|
|
|
|
[self presentViewController:alertController
|
|
|
|
|
animated:YES
|
|
|
|
|
completion:[UIUtil modalCompletionBlock]];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#pragma mark - SMS Composer Delegate
|
|
|
|
|