aboutsummaryrefslogtreecommitdiff
path: root/src/QuickMedia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r--src/QuickMedia.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index e18aa9a..85c3241 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -3650,10 +3650,14 @@ namespace QuickMedia {
tabs[MESSAGES_TAB_INDEX].body->select_last_item();
}
};
+
+ bool frame_skip_text_entry = false;
- chat_input.on_submit_callback = [this, &tabs, &me, &chat_input, &selected_tab, &current_room, &new_page, &chat_state, &pending_sent_replies, &currently_operating_on_item, &post_task_queue, &process_reactions, &find_body_item_by_event_id](std::string text) mutable {
+ chat_input.on_submit_callback = [this, &frame_skip_text_entry, &tabs, &me, &chat_input, &selected_tab, &current_room, &new_page, &chat_state, &pending_sent_replies, &currently_operating_on_item, &post_task_queue, &process_reactions, &find_body_item_by_event_id](std::string text) mutable {
if(!current_room)
return false;
+
+ frame_skip_text_entry = true;
if(selected_tab == MESSAGES_TAB_INDEX) {
if(text.empty())
@@ -3702,7 +3706,7 @@ namespace QuickMedia {
message->type = MessageType::TEXT;
message->timestamp = time(NULL) * 1000;
- const sf::Color provisional_message_color(171, 175, 180);
+ const sf::Color provisional_message_color(255, 255, 255, 180);
int num_items = tabs[MESSAGES_TAB_INDEX].body->items.size();
bool scroll_to_end = num_items == 0;
@@ -4305,7 +4309,6 @@ namespace QuickMedia {
}
float tab_shade_height = 0.0f;
- bool frame_skip_text_entry = false;
room_tabs[room_selected_tab].body->body_item_select_callback = [&move_room](BodyItem *body_item) {
move_room = true;
@@ -4439,7 +4442,7 @@ namespace QuickMedia {
goto chat_page_end;
}
- if((selected_tab == MESSAGES_TAB_INDEX || selected_tab == PINNED_TAB_INDEX) && event.key.code == sf::Keyboard::Enter) {
+ if((selected_tab == MESSAGES_TAB_INDEX || selected_tab == PINNED_TAB_INDEX) && event.key.code == sf::Keyboard::Enter && !frame_skip_text_entry) {
BodyItem *selected = tabs[selected_tab].body->get_selected();
if(selected) {
if(!display_url_or_image(selected))
@@ -5054,17 +5057,14 @@ namespace QuickMedia {
exit(exit_code);
auto rooms_body = create_body();
- rooms_body->thumbnail_mask_shader = &circle_mask_shader;
auto matrix_rooms_page_search_bar = create_search_bar("Search...", SEARCH_DELAY_FILTER);
auto matrix_rooms_page = std::make_unique<MatrixRoomsPage>(this, rooms_body.get(), "All rooms", nullptr, matrix_rooms_page_search_bar.get());
auto rooms_tags_body = create_body();
- rooms_tags_body->thumbnail_mask_shader = &circle_mask_shader;
auto matrix_rooms_tage_page_search_bar = create_search_bar("Search...", SEARCH_DELAY_FILTER);
auto matrix_rooms_tag_page = std::make_unique<MatrixRoomTagsPage>(this, rooms_tags_body.get(), matrix_rooms_tage_page_search_bar.get());
auto invites_body = create_body();
- invites_body->thumbnail_mask_shader = &circle_mask_shader;
auto matrix_invites_page_search_bar = create_search_bar("Search...", SEARCH_DELAY_FILTER);
auto matrix_invites_page = std::make_unique<MatrixInvitesPage>(this, matrix, invites_body.get(), matrix_invites_page_search_bar.get());