session-ios/Signal/src/ViewControllers/BlockListUIUtils.h
Matthew Chen 19d8f6cf01 Improvements around contact cells.
* Improve handling of accessory views/types.
* Use contact cell in “new/edit group” view.
* Don’t hide blocked contacts and group members in “new/edit group” view.
* Let users “unblock-to-add” blocked contacts in “new/edit group” view.

// FREEBIE
2017-04-06 20:59:07 -04:00

49 lines
1.9 KiB
Objective-C

//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class Contact;
@class OWSBlockingManager;
@class OWSContactsManager;
typedef void (^BlockActionCompletionBlock)(BOOL isBlocked);
@interface BlockListUIUtils : NSObject
- (instancetype)init NS_UNAVAILABLE;
#pragma mark - Block
+ (void)showBlockContactActionSheet:(Contact *)contact
fromViewController:(UIViewController *)fromViewController
blockingManager:(OWSBlockingManager *)blockingManager
contactsManager:(OWSContactsManager *)contactsManager
completionBlock:(nullable BlockActionCompletionBlock)completionBlock;
+ (void)showBlockPhoneNumberActionSheet:(NSString *)phoneNumber
fromViewController:(UIViewController *)fromViewController
blockingManager:(OWSBlockingManager *)blockingManager
contactsManager:(OWSContactsManager *)contactsManager
completionBlock:(nullable BlockActionCompletionBlock)completionBlock;
#pragma mark - Unblock
+ (void)showUnblockContactActionSheet:(Contact *)contact
fromViewController:(UIViewController *)fromViewController
blockingManager:(OWSBlockingManager *)blockingManager
contactsManager:(OWSContactsManager *)contactsManager
completionBlock:(nullable BlockActionCompletionBlock)completionBlock;
+ (void)showUnblockPhoneNumberActionSheet:(NSString *)phoneNumber
fromViewController:(UIViewController *)fromViewController
blockingManager:(OWSBlockingManager *)blockingManager
contactsManager:(OWSContactsManager *)contactsManager
completionBlock:(nullable BlockActionCompletionBlock)completionBlock;
@end
NS_ASSUME_NONNULL_END