diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Body.cpp | 3 | ||||
-rw-r--r-- | src/QuickMedia.cpp | 11 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/Body.cpp b/src/Body.cpp index b12ed7f..157ed03 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -841,6 +841,7 @@ namespace QuickMedia { float reaction_offset_x = 0.0f; item_pos.y += reaction_padding_y; float reaction_max_height = 0.0f; + // TODO: Fix first row wrap-around for(int i = 0; i < item->reactions.size(); ++i) { auto &reaction = item->reactions[i]; reaction.text->setMaxWidth(size.x - text_offset_x - image_padding_x); @@ -1027,4 +1028,4 @@ namespace QuickMedia { } return true; } -}
\ No newline at end of file +} diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index e50d08e..5c9ea36 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -1824,7 +1824,7 @@ namespace QuickMedia { window_size.y = event.size.height; sf::FloatRect visible_area(0, 0, window_size.x, window_size.y); window.setView(sf::View(visible_area)); - } else if(event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::Escape) { + } else if(event.type == sf::Event::KeyPressed && (event.key.code == sf::Keyboard::Escape || event.key.code == sf::Keyboard::Q)) { // To be able to close the video player while the video is loading current_page = previous_page; } @@ -3690,7 +3690,7 @@ namespace QuickMedia { body_item->set_description_color(sf::Color(255, 100, 100)); body_item->embedded_item = std::make_shared<BodyItem>(""); *body_item->embedded_item = *related_body_item; - body_item->reactions.clear(); + body_item->embedded_item->reactions.clear(); body_item->embedded_item_status = FetchStatus::FINISHED_LOADING; return; } @@ -3715,8 +3715,9 @@ namespace QuickMedia { if(related_body_item) { if((related_body_item->userdata && static_cast<Message*>(related_body_item->userdata)->user == me) || message_contains_user_mention(event_data->message->body, current_room->get_user_display_name(me)) || message_contains_user_mention(event_data->message->body, me->user_id)) body_item->set_description_color(sf::Color(255, 100, 100)); - *body_item = *related_body_item; - body_item->reactions.clear(); + body_item->embedded_item = std::make_shared<BodyItem>(""); + *body_item->embedded_item = *related_body_item; + body_item->embedded_item->reactions.clear(); event_data->status = FetchStatus::FINISHED_LOADING; event_data->message = static_cast<Message*>(related_body_item->userdata); body_item->userdata = event_data; @@ -3770,7 +3771,7 @@ namespace QuickMedia { body_item->set_description_color(sf::Color(255, 100, 100)); body_item->embedded_item = std::make_shared<BodyItem>(""); *body_item->embedded_item = *related_body_item; - body_item->reactions.clear(); + body_item->embedded_item->reactions.clear(); body_item->embedded_item_status = FetchStatus::FINISHED_LOADING; return; } |