Files
peko-ios/YuMi/Modules/YMMessage/View/Session/Content/SesssionModel/MessageApplicationShareModel.m
2023-07-14 18:50:55 +08:00

32 lines
886 B
Objective-C

//
// MessageApplicationShareModel.m
// YUMI
//
// Created by YUMI on 2023/1/30.
//
#import "MessageApplicationShareModel.h"
#import "AttachmentModel.h"
#import "ContentApplicationShareModel.h"
#import "NSObject+MJExtension.h"
@implementation MessageApplicationShareModel
- (instancetype)initWithMessage:(NIMMessage *)message {
if (self = [super initWithMessage:message]) {
self.messageType = SessionMessageType_Custom;
self.contentSize = CGSizeMake(200, 50);
self.height = 90 + CONTENT_PADDING_V_TOTAL;
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
AttachmentModel * attach = obj.attachment;
ContentApplicationShareModel *info = [ContentApplicationShareModel modelWithDictionary:attach.data];
self.shareInfo = info;
}
return self;
}
- (NSString *)cellContent:(MessageBaseModel *)model {
return @"MessageContentApplicationShareView";
}
@end