提交
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
|
||||
@property (nonatomic,assign)QXRoomRoleType roleType;
|
||||
@property (nonatomic,strong)QXDynamicCommentInputView *commentView;
|
||||
|
||||
@property (nonatomic,assign)QXRedPacketModel* redpacketModel;
|
||||
@end
|
||||
|
||||
@implementation QXRoomBottomView
|
||||
@@ -346,6 +348,12 @@
|
||||
[self.vc.view addSubview:self.commentView];
|
||||
[self.commentView.textField becomeFirstResponder];
|
||||
}
|
||||
-(void)inputMessageWithName:(NSString *)message redpacketModel:(QXRedPacketModel*)redpacketModel{
|
||||
self.redpacketModel = redpacketModel;
|
||||
self.commentView.textField.text = [NSString stringWithFormat:@"%@",message];
|
||||
[self.vc.view addSubview:self.commentView];
|
||||
[self.commentView.textField becomeFirstResponder];
|
||||
}
|
||||
#pragma mark - 发消息
|
||||
-(void)didClickSendWithText:(NSString*)text model:(nonnull QXDynamicCommentListModel *)model{
|
||||
if (self.roomModel.user_info.is_mute.intValue == 1) {
|
||||
@@ -357,7 +365,13 @@
|
||||
[[QXRoomMessageManager shared] sendChatMessage:text messageType:(QXRoomMessageTypeText) needInsertMessage:YES];
|
||||
self.commentView.textField.text = @"";
|
||||
[self.vc.view endEditing:YES];
|
||||
|
||||
if (self.redpacketModel == nil) {
|
||||
return;
|
||||
}
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didSendMessage:redpacketModel:)]) {
|
||||
[self.delegate didSendMessage:text redpacketModel:self.redpacketModel];
|
||||
}
|
||||
self.redpacketModel = nil;
|
||||
}
|
||||
|
||||
- (void)keyboardWillHide:(NSNotification *)notification {
|
||||
|
||||
Reference in New Issue
Block a user