2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Ignore accents in contacts list sorting.

This commit is contained in:
John Preston
2021-02-19 15:54:27 +04:00
parent 0a678ae8bd
commit f9f52302bb
8 changed files with 36 additions and 6 deletions

View File

@@ -62,6 +62,7 @@ History::History(not_null<Data::Session*> owner, PeerId peerId)
, peer(owner->peer(peerId))
, cloudDraftTextCache(st::dialogsTextWidthMin)
, _mute(owner->notifyIsMuted(peer))
, _chatListNameSortKey(owner->nameSortKey(peer->name))
, _sendActionPainter(this) {
if (const auto user = peer->asUser()) {
if (user->isBot()) {
@@ -2019,6 +2020,14 @@ const QString &History::chatListName() const {
return peer->name;
}
const QString &History::chatListNameSortKey() const {
return _chatListNameSortKey;
}
void History::refreshChatListNameSortKey() {
_chatListNameSortKey = owner().nameSortKey(peer->name);
}
const base::flat_set<QString> &History::chatListNameWords() const {
return peer->nameWords();
}