Merge pull request #120 from monich/chatmodel-crash
Fix crash in ChatModel
This commit is contained in:
commit
4de0cb213e
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ void ChatModel::initialize(const QVariantMap &chatInformation)
|
||||||
|
|
||||||
void ChatModel::triggerLoadMoreHistory()
|
void ChatModel::triggerLoadMoreHistory()
|
||||||
{
|
{
|
||||||
if (!this->inIncrementalUpdate) {
|
if (!this->inIncrementalUpdate && !messages.isEmpty()) {
|
||||||
qDebug() << "[ChatModel] Trigger loading older history...";
|
qDebug() << "[ChatModel] Trigger loading older history...";
|
||||||
this->inIncrementalUpdate = true;
|
this->inIncrementalUpdate = true;
|
||||||
this->tdLibWrapper->getChatHistory(this->chatId, this->messages.first().toMap().value("id").toLongLong());
|
this->tdLibWrapper->getChatHistory(this->chatId, this->messages.first().toMap().value("id").toLongLong());
|
||||||
|
|
Loading…
Reference in a new issue