Signal-iOS/SignalMessaging/utils/BlockListUIUtils.h
2020-04-10 13:17:08 -03:00

62 lines
2.2 KiB
Objective-C

//
// Copyright (c) 2020 Open Whisper Systems. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class Contact;
@class SignalAccount;
@class SignalServiceAddress;
@class TSGroupModel;
@class TSThread;
typedef void (^BlockActionCompletionBlock)(BOOL isBlocked);
@interface BlockListUIUtils : NSObject
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
#pragma mark - Block
+ (void)showBlockThreadActionSheet:(TSThread *)thread
fromViewController:(UIViewController *)fromViewController
completionBlock:(nullable BlockActionCompletionBlock)completionBlock;
+ (void)showBlockAddressActionSheet:(SignalServiceAddress *)address
fromViewController:(UIViewController *)fromViewController
completionBlock:(nullable BlockActionCompletionBlock)completionBlock;
+ (void)showBlockSignalAccountActionSheet:(SignalAccount *)signalAccount
fromViewController:(UIViewController *)fromViewController
completionBlock:(nullable BlockActionCompletionBlock)completionBlock;
#pragma mark - Unblock
+ (void)showUnblockThreadActionSheet:(TSThread *)thread
fromViewController:(UIViewController *)fromViewController
completionBlock:(nullable BlockActionCompletionBlock)completionBlock;
+ (void)showUnblockAddressActionSheet:(SignalServiceAddress *)address
fromViewController:(UIViewController *)fromViewController
completionBlock:(nullable BlockActionCompletionBlock)completionBlock;
+ (void)showUnblockSignalAccountActionSheet:(SignalAccount *)signalAccount
fromViewController:(UIViewController *)fromViewController
completionBlock:(nullable BlockActionCompletionBlock)completionBlock;
+ (void)showUnblockGroupActionSheet:(TSGroupModel *)groupModel
fromViewController:(UIViewController *)fromViewController
completionBlock:(nullable BlockActionCompletionBlock)completionBlock;
#pragma mark - UI Utils
+ (NSString *)formatDisplayNameForAlertTitle:(NSString *)displayName;
+ (NSString *)formatDisplayNameForAlertMessage:(NSString *)displayName;
@end
NS_ASSUME_NONNULL_END