32 lines
886 B
Objective-C
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
|