* Consolidate context menu actions into one class used by Stories list and my stories * add context menu to story viewer * change hidden stories header into a regular cell * generate context menu at tap time to properly reload hidden state * some cleanup * pr feedback * Add DelegatingContextMenuButton to maintain desired hooks without deviating ContextMenuButton's API from that of UIButton
49 lines
1.6 KiB
Objective-C
49 lines
1.6 KiB
Objective-C
//
|
|
// Copyright (c) 2022 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@class TSAttachmentStream;
|
|
|
|
typedef void (^AttachmentSharingCompletion)(void);
|
|
|
|
@interface AttachmentSharing : NSObject
|
|
|
|
+ (void)showShareUIForAttachment:(TSAttachmentStream *)stream sender:(nullable id)sender;
|
|
+ (void)showShareUIForAttachments:(NSArray<TSAttachmentStream *> *)attachments sender:(nullable id)sender;
|
|
|
|
+ (void)showShareUIForAttachment:(TSAttachmentStream *)stream
|
|
sender:(nullable id)sender
|
|
completion:(nullable AttachmentSharingCompletion)completion;
|
|
|
|
+ (void)showShareUIForAttachments:(NSArray<TSAttachmentStream *> *)attachments
|
|
sender:(nullable id)sender
|
|
completion:(nullable AttachmentSharingCompletion)completion;
|
|
|
|
+ (void)showShareUIForURL:(NSURL *)url sender:(nullable id)sender;
|
|
|
|
+ (void)showShareUIForURL:(NSURL *)url
|
|
sender:(nullable id)sender
|
|
completion:(nullable AttachmentSharingCompletion)completion;
|
|
|
|
+ (void)showShareUIForURLs:(NSArray<NSURL *> *)urls
|
|
sender:(nullable id)sender
|
|
completion:(nullable AttachmentSharingCompletion)completion;
|
|
|
|
+ (void)showShareUIForText:(NSString *)text sender:(nullable id)sender;
|
|
|
|
+ (void)showShareUIForText:(NSString *)text
|
|
sender:(nullable id)sender
|
|
completion:(nullable AttachmentSharingCompletion)completion;
|
|
|
|
#ifdef DEBUG
|
|
+ (void)showShareUIForUIImage:(UIImage *)image;
|
|
#endif
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|