Skip to content
This repository has been archived by the owner on Jul 2, 2019. It is now read-only.

修复一系列测试提出的Bug; #323

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

修复一系列测试提出的Bug; #323

wants to merge 5 commits into from

Conversation

ConnyYue
Copy link

@ConnyYue ConnyYue commented Jul 5, 2017

My issue:

仍然有一个发送超级长的文本会失败的问题,目前在本地做了控制不能超过300字,希望Leancloud可以有更好的方案

What I have done:

目前优化了60S录音的超时处理;增加了1S录音的后续处理;增加了录音过程中切换后台返回前台异常的问题;1S以内提示录音失败改为了提示时间太短;

@tang3w
Copy link
Contributor

tang3w commented Jul 6, 2017

感谢你的贡献!我们 review 一下这个 PR。

}
}

- (BOOL)JudgeAVAudioSession {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个方法名应该以小写字母开头。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的

- (BOOL)JudgeAVAudioSession {
__block BOOL bCanRecord = YES;
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
if ([audioSession respondsToSelector:@selector(requestRecordPermission:)]) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ChatKit 支持 iOS 7 及以上,-[AVAudioSession requestRecordPermission:] 在 iOS 7 上是可用的,可以直接调用。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我看看 这个修改本来只是自己项目里用 不小心提过来了

@@ -45,6 +45,7 @@ @interface LCCKChatBar () <UITextViewDelegate, UINavigationControllerDelegate, M
@property (assign, nonatomic) CGFloat oldTextViewHeight;
@property (nonatomic, assign, getter=shouldAllowTextViewContentOffset) BOOL allowTextViewContentOffset;
@property (nonatomic, assign, getter=isClosed) BOOL close;
@property (nonatomic, assign) BOOL outTime;//是否超时
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是不是用 timeout / timedOut / isTimedOut 之类的作为属性名更好?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的

@ConnyYue
Copy link
Author

ConnyYue commented Jul 6, 2017

@tang3w ChaiKit中有没有什么可以直接用的提醒 我在工程中 Development Pods里想加一个纯文本的提醒 其他的提醒好像都在Example中

@@ -664,6 +714,10 @@ - (void)sendTextMessage:(NSString *)text{
if (!text || text.length == 0 || [text lcck_isSpace]) {
return;
}
if (text.length > 1000) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

您好,请把这个数字作为一个常量,放在 LCCKConstants.h 中,例如:

static const NSUInteger kLCCKMessageMaxTextLength = 1000;

然后在 alert 中也用这个常量来构造提示信息。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants