diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-11-05 15:46:07 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-11-05 15:46:07 +0100 |
commit | aa4ff4cc74e7c654df8e399d4aae4cb8aa8fbd33 (patch) | |
tree | f9718e6c2dbe009d7a394e070e596ea6f55346ba | |
parent | ff207b4c7f160be58a747f0115e74ea136459f2c (diff) |
Fix text edit in matrix for non ascii characters
-rw-r--r-- | src/Entry.cpp | 2 | ||||
-rw-r--r-- | src/plugins/Matrix.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Entry.cpp b/src/Entry.cpp index ae370c5..cc05aa0 100644 --- a/src/Entry.cpp +++ b/src/Entry.cpp @@ -60,7 +60,7 @@ namespace QuickMedia { } void Entry::set_text(std::string new_text) { - text.setString(std::move(new_text)); + text.setString(sf::String::fromUtf8(new_text.data(), new_text.data() + new_text.size())); } void Entry::move_caret_to_end() { diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index e05d85c..e085912 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -1010,7 +1010,7 @@ namespace QuickMedia { // TODO: Instead of guessing notification limit with 100, accumulate rooms unread_notifications count and use that as the limit // (and take into account that notification response may have notifications after call to sync above). char url[512]; - snprintf(url, sizeof(url), "%s/_matrix/client/r0/notifications?limit=100", homeserver.c_str()); + snprintf(url, sizeof(url), "%s/_matrix/client/r0/notifications?limit=100&only=highlight", homeserver.c_str()); rapidjson::Document json_root; DownloadResult download_result = download_json(json_root, url, std::move(additional_args), true); |