mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Attachment Menu Improvements
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
@property (nonatomic) bool hasSilentPosting;
|
||||
@property (nonatomic) bool hasSchedule;
|
||||
@property (nonatomic) bool reminder;
|
||||
@property (nonatomic, copy) void (^presentScheduleController)(void (^)(int32_t));
|
||||
@property (nonatomic, copy) void (^presentScheduleController)(bool, void (^)(int32_t));
|
||||
@property (nonatomic, copy) void (^presentTimerController)(void (^)(int32_t));
|
||||
|
||||
@property (nonatomic, strong) NSArray *underlyingViews;
|
||||
|
||||
@@ -58,7 +58,7 @@ typedef enum {
|
||||
@property (nonatomic, copy) void(^finishedTransitionOut)(void);
|
||||
@property (nonatomic, copy) void(^customPresentOverlayController)(TGOverlayController *(^)(id<LegacyComponentsContext>));
|
||||
|
||||
@property (nonatomic, copy) void (^presentScheduleController)(void (^)(int32_t));
|
||||
@property (nonatomic, copy) void (^presentScheduleController)(bool, void (^)(int32_t));
|
||||
@property (nonatomic, copy) void (^presentTimerController)(void (^)(int32_t));
|
||||
|
||||
- (instancetype)initWithContext:(id<LegacyComponentsContext>)context saveEditedPhotos:(bool)saveEditedPhotos saveCapturedMedia:(bool)saveCapturedMedia;
|
||||
|
||||
@@ -64,7 +64,7 @@ typedef enum
|
||||
@property (nonatomic, assign) bool hasSilentPosting;
|
||||
@property (nonatomic, assign) bool hasSchedule;
|
||||
@property (nonatomic, assign) bool reminder;
|
||||
@property (nonatomic, copy) void (^presentScheduleController)(void (^)(int32_t));
|
||||
@property (nonatomic, copy) void (^presentScheduleController)(bool, void (^)(int32_t));
|
||||
@property (nonatomic, copy) void (^presentTimerController)(void (^)(int32_t));
|
||||
|
||||
@property (nonatomic, assign) bool liveVideoUploadEnabled;
|
||||
@@ -92,7 +92,7 @@ typedef enum
|
||||
- (UIBarButtonItem *)rightBarButtonItem;
|
||||
|
||||
- (void)send:(bool)silently;
|
||||
- (void)schedule;
|
||||
- (void)schedule:(bool)schedule;
|
||||
|
||||
- (NSArray *)resultSignalsWithCurrentItem:(TGMediaAsset *)currentItem descriptionGenerator:(id (^)(id, NSAttributedString *, NSString *, NSString *))descriptionGenerator;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
@property (nonatomic, assign) bool hasSilentPosting;
|
||||
@property (nonatomic, assign) bool hasSchedule;
|
||||
@property (nonatomic, assign) bool reminder;
|
||||
@property (nonatomic, copy) void (^presentScheduleController)(void (^)(int32_t));
|
||||
@property (nonatomic, copy) void (^presentScheduleController)(bool, void (^)(int32_t));
|
||||
@property (nonatomic, copy) void (^presentTimerController)(void (^)(int32_t));
|
||||
|
||||
@property (nonatomic, assign) CGFloat topInset;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
@property (nonatomic, copy) void (^editorOpened)(void);
|
||||
@property (nonatomic, copy) void (^editorClosed)(void);
|
||||
|
||||
@property (nonatomic, copy) void (^presentScheduleController)(void (^)(int32_t));
|
||||
@property (nonatomic, copy) void (^presentScheduleController)(bool, void (^)(int32_t));
|
||||
@property (nonatomic, copy) void (^presentTimerController)(void (^)(int32_t));
|
||||
|
||||
- (instancetype)initWithContext:(id<LegacyComponentsContext>)context item:(id)item fetchResult:(TGMediaAssetFetchResult *)fetchResult parentController:(TGViewController *)parentController thumbnailImage:(UIImage *)thumbnailImage selectionContext:(TGMediaSelectionContext *)selectionContext editingContext:(TGMediaEditingContext *)editingContext hasCaptions:(bool)hasCaptions allowCaptionEntities:(bool)allowCaptionEntities hasTimer:(bool)hasTimer onlyCrop:(bool)onlyCrop inhibitDocumentCaptions:(bool)inhibitDocumentCaptions inhibitMute:(bool)inhibitMute asFile:(bool)asFile itemsLimit:(NSUInteger)itemsLimit recipientName:(NSString *)recipientName hasSilentPosting:(bool)hasSilentPosting hasSchedule:(bool)hasSchedule reminder:(bool)reminder stickersContext:(id<TGPhotoPaintStickersContext>)stickersContext;
|
||||
|
||||
@@ -1618,7 +1618,7 @@ static CGPoint TGCameraControllerClampPointToScreenSize(__unused id self, __unus
|
||||
if (strongSelf == nil)
|
||||
return;
|
||||
|
||||
strongSelf.presentScheduleController(^(int32_t time) {
|
||||
strongSelf.presentScheduleController(true, ^(int32_t time) {
|
||||
__strong TGCameraController *strongSelf = weakSelf;
|
||||
__strong TGMediaPickerGalleryModel *strongModel = weakModel;
|
||||
|
||||
|
||||
@@ -363,7 +363,7 @@
|
||||
self.pickerController.reminder = reminder;
|
||||
}
|
||||
|
||||
- (void)setPresentScheduleController:(void (^)(void (^)(int32_t)))presentScheduleController {
|
||||
- (void)setPresentScheduleController:(void (^)(bool, void (^)(int32_t)))presentScheduleController {
|
||||
_presentScheduleController = [presentScheduleController copy];
|
||||
self.pickerController.presentScheduleController = presentScheduleController;
|
||||
}
|
||||
@@ -1432,9 +1432,9 @@
|
||||
[self completeWithCurrentItem:nil silentPosting:silently scheduleTime:0];
|
||||
}
|
||||
|
||||
- (void)schedule {
|
||||
- (void)schedule:(bool)media {
|
||||
__weak TGMediaAssetsController *weakSelf = self;
|
||||
self.presentScheduleController(^(int32_t scheduleTime) {
|
||||
self.presentScheduleController(media, ^(int32_t scheduleTime) {
|
||||
[weakSelf completeWithCurrentItem:nil silentPosting:false scheduleTime:scheduleTime];
|
||||
});
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
if (strongSelf == nil)
|
||||
return;
|
||||
|
||||
strongSelf.presentScheduleController(^(int32_t time) {
|
||||
strongSelf.presentScheduleController(true, ^(int32_t time) {
|
||||
__strong TGMediaPickerModernGalleryMixin *strongSelf = weakSelf;
|
||||
if (strongSelf == nil)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user