Private
Public Access
1
0

Adds support for image previews

Just need to append ?preview=1 to attachment fetch operation.
This commit is contained in:
James Magahern
2022-12-20 16:29:26 -08:00
parent ba8f76f4bd
commit 3082c4ab19
6 changed files with 144 additions and 12 deletions

View File

@@ -18,12 +18,18 @@ struct IMFileLocation_t {
int _field5;
};
struct IMPreviewConstraints {
double _field1;
struct CGSize _field2;
double _field3;
char _field4;
};
typedef struct IMPreviewConstraints {
CGFloat maxPxWidth;
CGSize minThumbnailPxSize;
CGFloat scale;
BOOL isSticker;
BOOL generateMetadata;
} IMPreviewConstraints;
extern IMPreviewConstraints IMPreviewConstraintsFromDictionary(NSDictionary *dictionary);
extern NSDictionary *IMPreviewConstraintsDictionaryFromConstraint(IMPreviewConstraints constraint);
extern BOOL IMPreviewConstraintsEqualToConstraints(IMPreviewConstraints constraints1, IMPreviewConstraints constraints2);
extern IMPreviewConstraints IMPreviewConstraintsZero(void);
struct _TidyDoc {
int _field1;
@@ -155,6 +161,8 @@ struct __va_list_tag {
- (void)setObject:(id)arg1 forKey:(id)arg2;
@end
extern NSURL* IMAttachmentPreviewFileURL(NSURL *attachmentURL, NSString *extension, BOOL generateIntermediaryDirectories);
@protocol IMPreviewGeneratorProtocol
+ (BOOL)shouldShadePreview;
+ (BOOL)shouldScaleUpPreview;