Respond to CR.

// FREEBIE
pull/1/head
Matthew Chen 7 years ago
parent 6b8d4ea7ae
commit 77a775bbce

@ -2,12 +2,12 @@
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import <Foundation/Foundation.h>
@class TSThread;
@class OWSMessageSender;
@class SignalAttachment;
NS_ASSUME_NONNULL_BEGIN
@interface ThreadUtil : NSObject
+ (void)sendMessageWithText:(NSString *)text
@ -19,3 +19,5 @@
messageSender:(OWSMessageSender *)messageSender;
@end
NS_ASSUME_NONNULL_END

@ -10,6 +10,8 @@
#import <SignalServiceKit/TSOutgoingMessage.h>
#import <SignalServiceKit/TSThread.h>
NS_ASSUME_NONNULL_BEGIN
@implementation ThreadUtil
+ (void)sendMessageWithText:(NSString *)text inThread:(TSThread *)thread messageSender:(OWSMessageSender *)messageSender
@ -95,3 +97,5 @@
}
@end
NS_ASSUME_NONNULL_END

@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface OWSTableContents : NSObject
@property (nonatomic) NSString *title;
@property (nonatomic) NSMutableArray *sections;
@property (nonatomic) NSMutableArray<OWSTableSection *> *sections;
@end
@ -23,12 +23,15 @@ NS_ASSUME_NONNULL_BEGIN
@implementation OWSTableContents
- (void)addSection:(OWSTableSection *)section {
OWSAssert(section);
if (!_sections) {
-(instancetype)init {
if (self = [self init]) {
_sections = [NSMutableArray new];
}
return self;
}
- (void)addSection:(OWSTableSection *)section {
OWSAssert(section);
[_sections addObject:section];
}
@ -40,7 +43,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface OWSTableSection : NSObject
@property (nonatomic) NSString *title;
@property (nonatomic) NSMutableArray *items;
@property (nonatomic) NSMutableArray<OWSTableItem *> *items;
@end
@ -56,6 +59,13 @@ NS_ASSUME_NONNULL_BEGIN
return section;
}
-(instancetype)init {
if (self = [self init]) {
_items = [NSMutableArray new];
}
return self;
}
- (void)addItem:(OWSTableItem *)item {
OWSAssert(item);

Loading…
Cancel
Save