We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://forum.leancloud.cn/t/querymessagesbeforeid-ios-bug/14340
重现步骤:
[self.conversation queryMessagesWithLimit:5 callback:^(NSArray * _Nullable objects, NSError * _Nullable error) { if (!error) { NSLog(@"第一次查出来 %@", objects); for (AVIMTextMessage *m1 in objects) { NSLog(@"%@", m1.text); } AVIMTextMessage *lastMessage = objects[0]; [self.conversation queryMessagesBeforeId:lastMessage.messageId timestamp:lastMessage.sendTimestamp limit:5 callback:^(NSArray * _Nullable objects2, NSError * _Nullable error) { NSLog(@"第二次查出来 %@", objects); for (AVIMTextMessage *m in objects2) { NSLog(@"%@", m.text); } }]; } }];
第一次查出:
2017-04-19 17:32:51.160208+0800 LeanChatCui[6043:2295880] 21 2017-04-19 17:32:51.160428+0800 LeanChatCui[6043:2295880] 22 2017-04-19 17:32:51.160720+0800 LeanChatCui[6043:2295880] 23 2017-04-19 17:32:51.160903+0800 LeanChatCui[6043:2295880] 24 2017-04-19 17:32:51.161270+0800 LeanChatCui[6043:2295880] 25
第二次应该查出 16 到 20,却返回了如下结果:
2017-04-19 17:32:53.374585+0800 LeanChatCui[6043:2295880] 333333333333333333333333333333333333333333333333333333(这个是之前对话的消息) 2017-04-19 17:32:53.374978+0800 LeanChatCui[6043:2295880] 1 2017-04-19 17:32:53.375179+0800 LeanChatCui[6043:2295880] 2 2017-04-19 17:32:53.375363+0800 LeanChatCui[6043:2295880] 3 2017-04-19 17:32:53.375470+0800 LeanChatCui[6043:2295880] (null)
The text was updated successfully, but these errors were encountered:
这个问题是由 https://github.com/leancloud/ios-sdk/issues/210 这个提议导致的,过早优化是万恶之源。
Sorry, something went wrong.
Solved in 4.3.0
tang3w
No branches or pull requests
https://forum.leancloud.cn/t/querymessagesbeforeid-ios-bug/14340
重现步骤:
第一次查出:
第二次应该查出 16 到 20,却返回了如下结果:
The text was updated successfully, but these errors were encountered: