mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Ignore accents in contacts list sorting.
This commit is contained in:
@@ -1156,6 +1156,10 @@ void Session::forgetPassportCredentials() {
|
||||
_passportCredentials = nullptr;
|
||||
}
|
||||
|
||||
QString Session::nameSortKey(const QString &name) const {
|
||||
return TextUtilities::RemoveAccents(name).toLower();
|
||||
}
|
||||
|
||||
void Session::setupMigrationViewer() {
|
||||
session().changes().peerUpdates(
|
||||
PeerUpdate::Flag::Migration
|
||||
@@ -1203,9 +1207,13 @@ void Session::setupPeerNameViewer() {
|
||||
session().changes().realtimeNameUpdates(
|
||||
) | rpl::start_with_next([=](const NameUpdate &update) {
|
||||
const auto peer = update.peer;
|
||||
if (const auto history = historyLoaded(peer)) {
|
||||
history->refreshChatListNameSortKey();
|
||||
}
|
||||
const auto &oldLetters = update.oldFirstLetters;
|
||||
_contactsNoChatsList.peerNameChanged(peer, oldLetters);
|
||||
_contactsList.peerNameChanged(peer, oldLetters);
|
||||
|
||||
}, _lifetime);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user