clang-format after RI

// FREEBIE
pull/1/head
Michael Kirk 7 years ago
parent a423fe8a0e
commit 0c6a42003f

@ -11,8 +11,8 @@
#import "DateUtil.h"
#import "DebugUIPage.h"
#import "FingerprintViewController.h"
#import "MediaDetailViewController.h"
#import "HomeViewController.h"
#import "MediaDetailViewController.h"
#import "NotificationsManager.h"
#import "OWSAnyTouchGestureRecognizer.h"
#import "OWSAudioAttachmentPlayer.h"

@ -31,7 +31,8 @@ NS_ASSUME_NONNULL_BEGIN
@implementation AttachmentMenuView
- (BOOL)canBecomeFirstResponder {
- (BOOL)canBecomeFirstResponder
{
return YES;
}
@ -128,7 +129,8 @@ NS_ASSUME_NONNULL_BEGIN
return _fileData;
}
- (UIImage *)image {
- (UIImage *)image
{
if (self.attachmentStream) {
return self.attachmentStream.image;
} else if (self.attachment) {
@ -191,12 +193,12 @@ NS_ASSUME_NONNULL_BEGIN
action:@selector(didTapDismissButton:)];
}
- (void)viewWillDisappear:(BOOL)animated {
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
if ([UIMenuController sharedMenuController].isMenuVisible) {
[[UIMenuController sharedMenuController] setMenuVisible:NO
animated:NO];
[[UIMenuController sharedMenuController] setMenuVisible:NO animated:NO];
}
}
@ -507,8 +509,8 @@ NS_ASSUME_NONNULL_BEGIN
[self.view addGestureRecognizer:swipe];
}
UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self
action:@selector(longPressGesture:)];
UILongPressGestureRecognizer *longPress =
[[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPressGesture:)];
longPress.delegate = self;
[self.view addGestureRecognizer:longPress];
}
@ -564,7 +566,8 @@ NS_ASSUME_NONNULL_BEGIN
[self dismissSelfAnimated:YES completion:nil];
}
- (void)longPressGesture:(UIGestureRecognizer *)sender {
- (void)longPressGesture:(UIGestureRecognizer *)sender
{
// We "eagerly" respond when the long press begins, not when it ends.
if (sender.state == UIGestureRecognizerStateBegan) {
if (!self.viewItem) {
@ -574,20 +577,15 @@ NS_ASSUME_NONNULL_BEGIN
[self.view becomeFirstResponder];
if ([UIMenuController sharedMenuController].isMenuVisible) {
[[UIMenuController sharedMenuController] setMenuVisible:NO
animated:NO];
[[UIMenuController sharedMenuController] setMenuVisible:NO animated:NO];
}
NSArray *menuItems = self.viewItem.mediaMenuControllerItems;
[UIMenuController sharedMenuController].menuItems = menuItems;
CGPoint location = [sender locationInView:self.view];
CGRect targetRect = CGRectMake(location.x,
location.y,
1, 1);
[[UIMenuController sharedMenuController] setTargetRect:targetRect
inView:self.view];
[[UIMenuController sharedMenuController] setMenuVisible:YES
animated:YES];
CGRect targetRect = CGRectMake(location.x, location.y, 1, 1);
[[UIMenuController sharedMenuController] setTargetRect:targetRect inView:self.view];
[[UIMenuController sharedMenuController] setMenuVisible:YES animated:YES];
}
}
@ -784,9 +782,10 @@ NS_ASSUME_NONNULL_BEGIN
}
completion:^(BOOL finished) {
// HACK: Setting the frame to itself *seems* like it should be a no-op, but
// it ensures the content is drawn at the right frame. In particular I was reproducibly
// some images squished (they were EXIF rotated, maybe relateed).
// similar to this report: https://stackoverflow.com/questions/27961884/swift-uiimageview-stretched-aspect
// it ensures the content is drawn at the right frame. In particular I was
// reproducibly some images squished (they were EXIF rotated, maybe
// relateed). similar to this report:
// https://stackoverflow.com/questions/27961884/swift-uiimageview-stretched-aspect
self.mediaView.frame = self.mediaView.frame;
// At this point our presentation view should be overlayed perfectly
@ -973,7 +972,8 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark - Saving images to Camera Roll
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo {
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
if (error) {
DDLogWarn(@"There was a problem saving <%@> to camera roll from %s ",
error.localizedDescription,

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import <UIKit/UIKit.h>

@ -303,8 +303,7 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value)
{
if (@available(iOS 9.0, *)) {
NSLayoutConstraint *constraint =
[self.bottomAnchor constraintEqualToAnchor:self.superview.layoutMarginsGuide.bottomAnchor
constant:-margin];
[self.bottomAnchor constraintEqualToAnchor:self.superview.layoutMarginsGuide.bottomAnchor constant:-margin];
constraint.active = YES;
return constraint;
} else {
@ -316,8 +315,7 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value)
{
if (@available(iOS 9.0, *)) {
NSLayoutConstraint *constraint =
[self.topAnchor constraintEqualToAnchor:self.superview.layoutMarginsGuide.topAnchor
constant:margin];
[self.topAnchor constraintEqualToAnchor:self.superview.layoutMarginsGuide.topAnchor constant:margin];
constraint.active = YES;
return constraint;
} else {

Loading…
Cancel
Save