From cd94bfc187d6a716f00d218e514409d8e65603c4 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 7 Oct 2020 17:15:48 +0200 Subject: Matrix: fix posting messages with non-ascii characters --- src/QuickMedia.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/QuickMedia.cpp') diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 283379a..a0e9b78 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -1055,7 +1055,7 @@ namespace QuickMedia { }; search_bar->autocomplete_search_delay = current_plugin->get_autocomplete_delay(); - search_bar->onAutocompleteRequestCallback = [this, &tabs, &selected_tab, &autocomplete_text](const sf::String &text) { + search_bar->onAutocompleteRequestCallback = [this, &tabs, &selected_tab, &autocomplete_text](const std::string &text) { if(tabs[selected_tab].body == body && !current_plugin->search_is_filter()) autocomplete_text = text; }; @@ -2666,7 +2666,7 @@ namespace QuickMedia { show_notification("QuickMedia", "File manager failed to get files in directory: " + file_manager->get_current_dir().string(), Urgency::CRITICAL); } - search_bar->onTextUpdateCallback = [this](const sf::String &text) { + search_bar->onTextUpdateCallback = [this](const std::string &text) { body->filter_search_fuzzy(text); body->reset_selected(); }; @@ -3507,9 +3507,9 @@ namespace QuickMedia { chat_input.draw_background = false; chat_input.set_editable(false); - chat_input.on_submit_callback = [matrix, &chat_input, &tabs, &selected_tab, ¤t_room_id, &new_page, &chat_state, ¤tly_operating_on_item](const sf::String &text) mutable { + chat_input.on_submit_callback = [matrix, &chat_input, &tabs, &selected_tab, ¤t_room_id, &new_page, &chat_state, ¤tly_operating_on_item](const std::string &text) mutable { if(tabs[selected_tab].type == ChatTabType::MESSAGES) { - if(text.isEmpty()) + if(text.empty()) return false; if(chat_state == ChatState::TYPING_MESSAGE && text[0] == '/') { -- cgit v1.2.3