Skip to content

Commit 4ae0f7f

Browse files
authored
Objc methods spacing cleanup (#111)
1 parent 5f8ae49 commit 4ae0f7f

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Diff for: Proton/Sources/ObjC/PRTextStorage.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ - (void)setAttributes:(NSDictionary<NSString *, id> *)attrs range:(NSRange)range
137137
[self endEditing];
138138
}
139139

140-
- (void)insertAttachmentInRange:(NSRange)range attachment:(NSTextAttachment *_Nonnull)attachment withSpacer: (NSAttributedString *) spacer {
140+
- (void)insertAttachmentInRange:(NSRange)range attachment:(NSTextAttachment *_Nonnull)attachment withSpacer:(NSAttributedString *)spacer {
141141
NSCharacterSet *spacerCharacterSet = [NSCharacterSet whitespaceCharacterSet]; //attachment.spacerCharacterSet;
142142
BOOL hasNextSpacer = NO;
143143
if (range.location + 1 < self.length) {
@@ -148,7 +148,7 @@ - (void)insertAttachmentInRange:(NSRange)range attachment:(NSTextAttachment *_No
148148
NSMutableAttributedString *attachmentString = [[NSMutableAttributedString attributedStringWithAttachment:attachment] mutableCopy];
149149

150150
if (hasNextSpacer == NO) {
151-
[attachmentString appendAttributedString: spacer];
151+
[attachmentString appendAttributedString:spacer];
152152
}
153153

154154
[self replaceCharactersInRange:range withAttributedString:attachmentString];

Diff for: Proton/Sources/ObjC/include/PRTextStorage.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ NS_SWIFT_NAME(DefaultTextFormattingProviding)
3737
NS_SWIFT_NAME(TextStorageDelegate)
3838
@protocol PRTextStorageDelegate<NSObject>
3939
@required
40-
- (void) textStorage:(PRTextStorage *) textStorage didDelete: (NSTextAttachment *) attachment;
41-
- (void) textStorage:(PRTextStorage *) textStorage will:(NSAttributedString *) deleteText insertText: (NSAttributedString *) insertedText in: (NSRange) range;
42-
- (void) textStorage:(PRTextStorage *) textStorage edited:(NSTextStorageEditActions) actions in: (NSRange) editedRange changeInLength: (NSInteger) delta;
40+
- (void)textStorage:(PRTextStorage *)textStorage didDelete:(NSTextAttachment *)attachment;
41+
- (void)textStorage:(PRTextStorage *)textStorage will:(NSAttributedString *)deleteText insertText:(NSAttributedString *)insertedText in:(NSRange)range;
42+
- (void)textStorage:(PRTextStorage *)textStorage edited:(NSTextStorageEditActions)actions in:(NSRange)editedRange changeInLength:(NSInteger)delta;
4343
@end
4444

4545
@interface PRTextStorage : NSTextStorage
@@ -52,7 +52,7 @@ NS_SWIFT_NAME(TextStorageDelegate)
5252
@property (nonatomic, readonly) UIColor *defaultTextColor;
5353

5454
- (void)removeAttributes:(NSArray<NSAttributedStringKey> *)attrs range:(NSRange)range;
55-
- (void)insertAttachmentInRange:(NSRange)range attachment:(NSTextAttachment *)attachment withSpacer: (NSAttributedString *) spacer;
55+
- (void)insertAttachmentInRange:(NSRange)range attachment:(NSTextAttachment *)attachment withSpacer:(NSAttributedString *)spacer;
5656

5757
@end
5858

Diff for: Proton/Sources/Swift/Core/RichTextView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import ProtonCore
2424

2525
class RichTextView: AutogrowingTextView {
2626

27-
/// Equivilant, strongly-typed alternative to `textStorage`
27+
/// Equivalent, strongly-typed alternative to `textStorage`
2828
private let richTextStorage = PRTextStorage()
2929
static let defaultListLineFormatting = LineFormatting(indentation: 25, spacingBefore: 0)
3030

0 commit comments

Comments
 (0)