mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-19 10:46:35 +00:00
Deprecate feedbackComposerPreparedItems in favor of delegate method
This commit is contained in:
@@ -232,9 +232,11 @@ typedef NS_ENUM(NSInteger, BITFeedbackObservationMode) {
|
||||
All NSString-Content in the array will be concatenated and result in the message,
|
||||
while all UIImage and NSData-instances will be turned into attachments.
|
||||
|
||||
@deprecated This property is deprecated in favor of `BITFeedbackManagerDelegate preparedItemsForFeedbackManager:`.
|
||||
|
||||
@see `[BITFeedbackComposeViewController prepareWithItems:]`
|
||||
*/
|
||||
@property (nonatomic, copy) NSArray *feedbackComposerPreparedItems;
|
||||
@property (nonatomic, copy, nullable) NSArray *feedbackComposerPreparedItems DEPRECATED_MSG_ATTRIBUTE("Use -preparedItemsForFeedbackManager: delegate method instead.");
|
||||
|
||||
|
||||
/**
|
||||
@@ -318,11 +320,16 @@ typedef NS_ENUM(NSInteger, BITFeedbackObservationMode) {
|
||||
All NSString-Content in the array will be concatenated and result in the message,
|
||||
while all UIImage and NSData-instances will be turned into attachments.
|
||||
|
||||
Alternatively you can implement the `preparedItemsForFeedbackManager:` delegate method
|
||||
and call `showFeedbackComposeView` instead. If you use both, the items from the delegate method
|
||||
and the items passed with this method will be combined.
|
||||
|
||||
@param items an NSArray with objects that should be attached
|
||||
@see `[BITFeedbackComposeViewController prepareWithItems:]`
|
||||
@see `BITFeedbackManagerDelegate preparedItemsForFeedbackManager:`
|
||||
@warning This methods needs to be called on the main thread!
|
||||
*/
|
||||
- (void)showFeedbackComposeViewWithPreparedItems:(NSArray *)items;
|
||||
- (void)showFeedbackComposeViewWithPreparedItems:(nullable NSArray *)items;
|
||||
|
||||
/**
|
||||
Presents a modal feedback compose interface with a screenshot attached which is taken at the time of calling this method.
|
||||
|
||||
@@ -232,7 +232,10 @@ typedef void (^BITLatestImageFetchCompletionBlock)(UIImage *_Nonnull latestImage
|
||||
- (BITFeedbackComposeViewController *)feedbackComposeViewController {
|
||||
BITFeedbackComposeViewController *composeViewController = [[BITFeedbackComposeViewController alloc] init];
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated"
|
||||
NSArray *preparedItems = self.feedbackComposerPreparedItems;
|
||||
#pragma clang diagnostic pop
|
||||
if ([self.delegate respondsToSelector:@selector(preparedItemsForFeedbackManager:)]) {
|
||||
preparedItems = [preparedItems arrayByAddingObjectsFromArray:[self.delegate preparedItemsForFeedbackManager:self]];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user