only load 50 messages on channel switch (also fix member menu)

This commit is contained in:
ouwou committed 2020-09-14 00:17:58 -04:00
1 parent 2822add5fe
commit e5a90b9461
8 files changed
+46 -2

No files matched your search

+11
View File
@@ -237,6 +237,17 @@ void ChatWindow::InsertChatInput(std::string text) {
m_input->grab_focus();
}
Snowflake ChatWindow::GetOldestListedMessage() {
Snowflake m;
for (const auto& [id, widget] : m_id_to_widget) {
if (id < m)
m = id;
}
return m;
}
void ChatWindow::ScrollToBottom() {
auto x = m_scroll->get_vadjustment();
x->set_value(x->get_upper());