Skip to content

Commit

Permalink
添加 消息相关宏定义,修复一些bug
Browse files Browse the repository at this point in the history
  • Loading branch information
TenderTeng committed Dec 18, 2017
1 parent 7100c22 commit 741e83f
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 1 deletion.
Expand Up @@ -8,6 +8,19 @@

#import <UIKit/UIKit.h>
#import <BQMM/BQMM.h>

#define TEXT_MESG_TYPE @"txt_msgType" //key for text message
#define TEXT_MESG_FACE_TYPE @"facetype" //key for big emoji type
#define TEXT_MESG_EMOJI_TYPE @"emojitype" //key for photo-text message
#define TEXT_MESG_WEB_TYPE @"webtype" //key for web sticker message
#define TEXT_MESG_DATA @"msg_data" //key for ext data of message

#define WEBSTICKER_IS_GIF @"is_gif" //key for web sticker is gif or not
#define WEBSTICKER_ID @"data_id" //key for web sticker id
#define WEBSTICKER_URL @"sticker_url" //key for web sticker url
#define WEBSTICKER_HEIGHT @"h" //key for web sticker height
#define WEBSTICKER_WIDTH @"w" //key for web sticker width

typedef NS_OPTIONS (NSInteger, MMSearchModeStatus) {
MMSearchModeStatusKeyboardHide = 1 << 0, //收起键盘
MMSearchModeStatusInputEndEditing = 1 << 1, //收起键盘
Expand Down
Expand Up @@ -25,6 +25,7 @@
#import "MMTextParser.h"
#import <BQMM/BQMM.h>
#import "MMTextView.h"
#import "MMGifManager.h"

@interface ChatViewController ()<UIAlertViewDelegate,EMClientDelegate, EMChooseViewDelegate>
{
Expand Down
Expand Up @@ -16,6 +16,9 @@
#import "UserProfileManager.h"
#import "RedPacketChatViewController.h"

//BQMM集成
#import "MMGifManager.h"


@interface ContactListSelectViewController () <EMUserListViewControllerDelegate,EMUserListViewControllerDataSource>

Expand Down
3 changes: 3 additions & 0 deletions EaseUI/EMUIKit/Model/EaseMessageModel.m
Expand Up @@ -15,6 +15,9 @@
#import "EaseEmotionEscape.h"
#import "EaseConvertToCommonEmoticonsHelper.h"

//BQMM集成
#import "MMGifManager.h"

@implementation EaseMessageModel

- (instancetype)initWithMessage:(EMMessage *)message
Expand Down
8 changes: 7 additions & 1 deletion EaseUI/EMUIKit/ViewController/EaseMessageViewController.m
Expand Up @@ -151,8 +151,14 @@ - (void)viewDidLoad {
//BQMM集成 设置gif搜索相关
[[MMGifManager defaultManager] setSearchModeEnabled:true withInputView:((EaseChatToolbar *)self.chatToolbar).inputTextView];
[[MMGifManager defaultManager] setSearchUiVisible:true withAttatchedView:self.chatToolbar];
__weak EaseMessageViewController* weakSelf = self;
[MMGifManager defaultManager].selectedHandler = ^(MMGif * _Nullable gif) {
[self didSendGifMessage:gif];
__strong EaseMessageViewController *tempSelf = weakSelf;
if(tempSelf) {
((EaseChatToolbar *)self.chatToolbar).inputTextView.text = nil;
[tempSelf didSendGifMessage:gif];
}

};
}

Expand Down
Expand Up @@ -18,6 +18,7 @@

#import <BQMM/BQMM.h>
#import "MMTextParser.h"
#import "MMGifManager.h"


@interface EaseBaseMessageCell()
Expand Down
Expand Up @@ -23,6 +23,7 @@

#import "UIImage+EMGIF.h"
#import "UIImageView+EMWebCache.h"
#import "MMGifManager.h"


@interface EaseCustomMessageCell ()
Expand Down
Expand Up @@ -25,6 +25,7 @@
//BQMM集成
#import "MMTextView.h"
#import "MMTextParser.h"
#import "MMGifManager.h"

CGFloat const EaseMessageCellPadding = 10;

Expand Down
Expand Up @@ -888,6 +888,7 @@ - (void)willShowBottomView:(UIView *)bottomView
//表情MM代理
#pragma mark - *MMEmotionCentreDelegate
- (void)didClickGifTab {
self.faceButton.selected = NO;
if ([self.delegate respondsToSelector:@selector(didClickGifTab)]) {
[self.delegate didClickGifTab];
}
Expand Down

0 comments on commit 741e83f

Please sign in to comment.