2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-03 16:05:57 +00:00

Add animations enable/disable setting.

Open chats / users on mouse press if animations are disabled.
This commit is contained in:
John Preston
2018-09-20 20:56:45 +03:00
parent 04dd4e30a8
commit fd0719db6d
12 changed files with 113 additions and 41 deletions

View File

@@ -214,15 +214,17 @@ bool BlockedBoxController::prependRow(UserData *user) {
std::unique_ptr<PeerListRow> BlockedBoxController::createRow(UserData *user) const {
auto row = std::make_unique<PeerListRowWithLink>(user);
row->setActionLink(lang(lng_blocked_list_unblock));
auto status = [user]() -> QString {
if (user->botInfo) {
const auto status = [&] {
if (!user->phone().isEmpty()) {
return App::formatPhone(user->phone());
} else if (!user->username.isEmpty()) {
return '@' + user->username;
} else if (user->botInfo) {
return lang(lng_status_bot);
} else if (user->phone().isEmpty()) {
return lang(lng_blocked_list_unknown_phone);
}
return App::formatPhone(user->phone());
};
row->setCustomStatus(status());
return lang(lng_blocked_list_unknown_phone);
}();
row->setCustomStatus(status);
return std::move(row);
}