2015-10-01 18:19:52 +02:00
|
|
|
#import "TGNeoRenderableViewModel.h"
|
|
|
|
|
|
|
|
@class TGBridgeMessage;
|
|
|
|
@class TGBridgeUser;
|
|
|
|
@class TGBridgeContext;
|
|
|
|
|
2016-02-25 01:03:51 +01:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
TGNeoMessageTypeGeneric,
|
|
|
|
TGNeoMessageTypeGroup,
|
|
|
|
TGNeoMessageTypeChannel
|
|
|
|
} TGNeoMessageType;
|
|
|
|
|
2015-10-01 18:19:52 +02:00
|
|
|
@interface TGNeoMessageViewModel : TGNeoRenderableViewModel
|
|
|
|
|
|
|
|
@property (nonatomic, readonly) int32_t identifier;
|
2016-02-25 01:03:51 +01:00
|
|
|
@property (nonatomic, readonly) TGNeoMessageType type;
|
2015-10-01 18:19:52 +02:00
|
|
|
@property (nonatomic, readonly) NSDictionary *additionalLayout;
|
|
|
|
@property (nonatomic, assign) bool showBubble;
|
|
|
|
|
2016-02-25 01:03:51 +01:00
|
|
|
- (instancetype)initWithMessage:(TGBridgeMessage *)message type:(TGNeoMessageType)type users:(NSDictionary *)users context:(TGBridgeContext *)context;
|
2015-10-01 18:19:52 +02:00
|
|
|
|
|
|
|
- (void)addAdditionalLayout:(NSDictionary *)layout withKey:(NSString *)key;
|
|
|
|
|
2016-02-25 01:03:51 +01:00
|
|
|
+ (TGNeoMessageViewModel *)viewModelForMessage:(TGBridgeMessage *)message type:(TGNeoMessageType)type context:(TGBridgeContext *)context additionalPeers:(NSDictionary *)additionalPeers;
|
2015-10-01 18:19:52 +02:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
extern NSString *const TGNeoContentInset;
|
|
|
|
|
|
|
|
extern NSString *const TGNeoMessageHeaderGroup;
|
|
|
|
extern NSString *const TGNeoMessageReplyImageGroup;
|
|
|
|
extern NSString *const TGNeoMessageReplyMediaAttachment;
|
|
|
|
|
|
|
|
extern NSString *const TGNeoMessageMediaGroup;
|
|
|
|
extern NSString *const TGNeoMessageMediaImage;
|
|
|
|
extern NSString *const TGNeoMessageMediaImageAttachment;
|
|
|
|
extern NSString *const TGNeoMessageMediaImageSpinner;
|
|
|
|
extern NSString *const TGNeoMessageMediaPlayButton;
|
|
|
|
extern NSString *const TGNeoMessageMediaSize;
|
|
|
|
extern NSString *const TGNeoMessageMediaMap;
|
|
|
|
extern NSString *const TGNeoMessageMediaMapSize;
|
|
|
|
extern NSString *const TGNeoMessageMediaMapCoordinate;
|
|
|
|
|
|
|
|
extern NSString *const TGNeoMessageMetaGroup;
|
|
|
|
extern NSString *const TGNeoMessageAvatarGroup;
|
|
|
|
extern NSString *const TGNeoMessageAvatarUrl;
|
|
|
|
extern NSString *const TGNeoMessageAvatarColor;
|
|
|
|
extern NSString *const TGNeoMessageAvatarInitials;
|
|
|
|
|
|
|
|
extern NSString *const TGNeoMessageAudioButton;
|
2016-02-25 01:03:51 +01:00
|
|
|
extern NSString *const TGNeoMessageAudioButtonHasBackground;
|
|
|
|
extern NSString *const TGNeoMessageAudioIcon;
|
|
|
|
extern NSString *const TGNeoMessageAudioIconTint;
|
|
|
|
extern NSString *const TGNeoMessageAudioAnimatedIcon;
|