diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-12-14 09:21:44 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-12-14 09:21:44 +0100 |
commit | 951c3b640d97ebb99b6e2ec90f9f356596fbf8a5 (patch) | |
tree | f659d478fa92cfd91522075e0ab47e84bac30461 /src | |
parent | 88fed1806e56181a9161c20bcd93cd06d52a5533 (diff) |
Scroll to end if typing text
Diffstat (limited to 'src')
-rw-r--r-- | src/QuickMedia.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 9a47420..4b19722 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -3874,13 +3874,13 @@ namespace QuickMedia { } }; - auto add_new_messages_to_current_room = [&me, &tabs, &selected_tab, ¤t_room, &chat_state](Messages &messages) { + auto add_new_messages_to_current_room = [&me, &tabs, &selected_tab, ¤t_room](Messages &messages) { if(messages.empty()) return; int num_items = tabs[MESSAGES_TAB_INDEX].body->items.size(); bool scroll_to_end = num_items == 0; - if(selected_tab == MESSAGES_TAB_INDEX && (tabs[MESSAGES_TAB_INDEX].body->is_selected_item_last_visible_item() || !tabs[MESSAGES_TAB_INDEX].body->get_selected()) && chat_state != ChatState::TYPING_MESSAGE) + if(selected_tab == MESSAGES_TAB_INDEX && (tabs[MESSAGES_TAB_INDEX].body->is_selected_item_last_visible_item() || !tabs[MESSAGES_TAB_INDEX].body->get_selected())) scroll_to_end = true; if(current_room->initial_prev_messages_fetch) { |