diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/QuickMedia.cpp | 5 | ||||
-rw-r--r-- | src/plugins/Matrix.cpp | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 3bd75d6..205b201 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -4739,6 +4739,11 @@ namespace QuickMedia { item_background.setPosition(sf::Vector2f(0.0f, body_item_pos.y - replying_to_text_height - margin)); item_background.setFillColor(back_color); window.draw(item_background); + + sf::RectangleShape message_box_shade_left(sf::Vector2f(body_pos.x, chat_input_height_full)); + message_box_shade_left.setPosition(0.0f, window_size.y - chat_input_height_full); + message_box_shade_left.setFillColor(chat_input_shade.getFillColor()); + window.draw(message_box_shade_left); replying_to_text.setPosition(body_item_pos.x, body_item_pos.y - replying_to_text_height); window.draw(replying_to_text); diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index 8c9b1c1..d3e8117 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -674,13 +674,17 @@ namespace QuickMedia { for(size_t i = 0; i < body->items.size(); ++i) { RoomData *room_i = static_cast<RoomData*>(body->items[i]->userdata); - if((int)i != selected_item && room_i && room->last_message_timestamp > room_i->last_message_timestamp) { + if((int)i == room_body_index) + return; + if((int)i != selected_item && room_i && room->last_message_timestamp >= room_i->last_message_timestamp) { auto body_item_to_insert = body->items[room_body_index]; body->items.erase(body->items.begin() + room_body_index); - if((int)i <= room_body_index) + if(room_body_index >= (int)i) body->items.insert(body->items.begin() + i, std::move(body_item_to_insert)); else body->items.insert(body->items.begin() + (i - 1), std::move(body_item_to_insert)); + if((int)i < selected_item && room_body_index > selected_item && body->items.size() > 1 && i != body->items.size() - 1) + body->set_selected_item(selected_item + 1); return; } } |