Revision 8d76e2e3 ChatSecure/Classes/View Controllers/OTRMessagesViewController.m
| ChatSecure/Classes/View Controllers/OTRMessagesViewController.m | ||
|---|---|---|
| 223 | 223 |
[self scrollToBottomAnimated:animated]; |
| 224 | 224 |
}); |
| 225 | 225 |
self.loadingMessages = NO; |
| 226 |
[self fetchMessageHistory]; |
|
| 226 | 227 |
} |
| 227 | 228 |
|
| 228 | 229 |
- (void)viewWillAppear:(BOOL)animated |
| ... | ... | |
| 311 | 312 |
|
| 312 | 313 |
#pragma - mark Setters & getters |
| 313 | 314 |
|
| 315 |
- (void) fetchMessageHistory {
|
|
| 316 |
[self.readOnlyDatabaseConnection asyncReadWithBlock:^(YapDatabaseReadTransaction * _Nonnull transaction) {
|
|
| 317 |
id<OTRThreadOwner> thread = [self threadObjectWithTransaction:transaction]; |
|
| 318 |
OTRXMPPManager *xmpp = [self xmppManagerWithTransaction:transaction]; |
|
| 319 |
[xmpp fetchHistoryForThread:thread transaction:transaction]; |
|
| 320 |
}]; |
|
| 321 |
} |
|
| 322 |
|
|
| 314 | 323 |
- (OTRAttachmentPicker *)attachmentPicker |
| 315 | 324 |
{
|
| 316 | 325 |
if (!_attachmentPicker) {
|
| ... | ... | |
| 491 | 500 |
account = [OTRAccount fetchObjectWithUniqueID:buddy.accountUniqueId transaction:transaction]; |
| 492 | 501 |
}]; |
| 493 | 502 |
|
| 494 |
|
|
| 495 |
|
|
| 496 | 503 |
//Update UI now |
| 497 | 504 |
if (buddy.chatState == OTRChatStateComposing || buddy.chatState == OTRChatStatePaused) {
|
| 498 | 505 |
self.showTypingIndicator = YES; |
Also available in: Unified diff