Use same sorting method in emote popup as in the completion model

Fixes #1549
This commit is contained in:
Rasmus Karlsson
2020-02-15 15:49:06 +01:00
parent b93de7c0f6
commit 64c58e724a
4 changed files with 21 additions and 8 deletions
+3 -1
View File
@@ -1,6 +1,7 @@
#include "EmotePopup.hpp"
#include "Application.hpp"
#include "common/CompletionModel.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "debug/Benchmark.hpp"
#include "messages/Message.hpp"
@@ -37,7 +38,8 @@ namespace {
std::sort(vec.begin(), vec.end(),
[](const std::pair<EmoteName, EmotePtr> &l,
const std::pair<EmoteName, EmotePtr> &r) {
return l.first.string < r.first.string;
return CompletionModel::compareStrings(
l.first.string, r.first.string);
});
for (const auto &emote : vec)
{