|
@@ -44,7 +44,6 @@
|
|
|
[super viewDidLoad];
|
|
|
// Do any additional setup after loading the view from its nib.
|
|
|
self.title = self.friendModel.userName;
|
|
|
- [self configNavigationBar];
|
|
|
dispatch_async(dispatch_queue_create("sl.cache.chat.date", DISPATCH_QUEUE_CONCURRENT), ^{
|
|
|
NSString *key = [NSString stringWithFormat:@"%@--to--%@",[SLGlobalInfo SharedInstance].loginInfo.user.userId, self.friendModel.userId];
|
|
|
NSArray *arr = [[NSUserDefaults standardUserDefaults] objectForKey:key];
|
|
@@ -77,7 +76,9 @@
|
|
|
if (!msgModel.isReceive && msgModel.showMike) {
|
|
|
[weakSelf.nuisdkPlay playSendVoice:msgModel];
|
|
|
}else {
|
|
|
- [weakSelf.nuisdkPlay startTTSWith:msgModel.sendText roleModel:[SLGlobalInfo SharedInstance].roleModel finshBlock:^{
|
|
|
+ RoleModel *model = [RoleModel mj_objectWithKeyValues:[[SLGlobalInfo SharedInstance].roleModel mj_JSONObject]];
|
|
|
+ model.dataSex = weakSelf.friendModel.sex;
|
|
|
+ [weakSelf.nuisdkPlay startTTSWith:msgModel.sendText roleModel:model finshBlock:^{
|
|
|
|
|
|
}];
|
|
|
}
|
|
@@ -88,6 +89,8 @@
|
|
|
//
|
|
|
// }];
|
|
|
|
|
|
+ [self configNavigationBar];
|
|
|
+
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillChangeFrame:) name:UIKeyboardWillShowNotification object:nil];
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidHide:) name:UIKeyboardWillHideNotification object:nil];
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationEnterBackground) name: UIApplicationDidEnterBackgroundNotification object:nil];
|
|
@@ -204,7 +207,7 @@
|
|
|
_mikeInputView.nuiSpeechRecognizer.recognizerResultBlock = ^(NSString * _Nonnull text, NSString * _Nonnull voicePath) {
|
|
|
MessageModel *model = [MessageModel initWithSendText:text isReceive:NO showMike:YES showText:NO isMike:YES voicePath:voicePath];
|
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
- if (model.audioDuration < 1.2) {
|
|
|
+ if (model.audioDuration < 1.0) {
|
|
|
[ZFToast ShowWithMessage:@"说话时间太短!"];
|
|
|
}else {
|
|
|
model.toId = weakSelf.friendModel.userId;
|