|
|
|
@ -355,6 +355,7 @@ GenericChatForm::GenericChatForm(const Contact* contact, IChatLog& chatLog,
@@ -355,6 +355,7 @@ GenericChatForm::GenericChatForm(const Contact* contact, IChatLog& chatLog,
|
|
|
|
|
connect(chatWidget, &ChatLog::customContextMenuRequested, this, |
|
|
|
|
&GenericChatForm::onChatContextMenuRequested); |
|
|
|
|
connect(chatWidget, &ChatLog::firstVisibleLineChanged, this, &GenericChatForm::updateShowDateInfo); |
|
|
|
|
connect(chatWidget, &ChatLog::loadHistoryLower, this, &GenericChatForm::loadHistoryLower); |
|
|
|
|
|
|
|
|
|
connect(searchForm, &SearchForm::searchInBegin, this, &GenericChatForm::searchInBegin); |
|
|
|
|
connect(searchForm, &SearchForm::searchUp, this, &GenericChatForm::onSearchUp); |
|
|
|
@ -979,6 +980,19 @@ void GenericChatForm::renderMessages(ChatLogIdx begin, ChatLogIdx end,
@@ -979,6 +980,19 @@ void GenericChatForm::renderMessages(ChatLogIdx begin, ChatLogIdx end,
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void GenericChatForm::loadHistoryLower() |
|
|
|
|
{ |
|
|
|
|
auto begin = messages.begin()->first; |
|
|
|
|
|
|
|
|
|
if (begin.get() > 100) { |
|
|
|
|
begin = ChatLogIdx(begin.get() - 100); |
|
|
|
|
} else { |
|
|
|
|
begin = ChatLogIdx(0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
renderMessages(begin, chatLog.getNextIdx()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void GenericChatForm::updateShowDateInfo(const ChatLine::Ptr& line) |
|
|
|
|
{ |
|
|
|
|
const auto date = getTime(line); |
|
|
|
|