2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Slightly improved appearing of usernames list.

This commit is contained in:
23rd
2022-10-12 21:16:04 +03:00
committed by John Preston
parent d55ff7aa4a
commit 17623640b3
5 changed files with 52 additions and 2 deletions

View File

@@ -48,6 +48,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "window/window_peer_menu.h"
#include "apiwrap.h"
#include "api/api_peer_photo.h"
#include "api/api_user_names.h"
#include "core/file_utilities.h"
#include "base/call_delayed.h"
#include "base/unixtime.h"
@@ -445,12 +446,19 @@ void SetupRows(
"internal:edit_username" });
return result;
});
session->api().usernames().requestToCache(session->user());
AddRow(
container,
std::move(label),
std::move(value),
tr::lng_context_copy_mention(tr::now),
[=] { controller->show(Box(UsernamesBox, session)); },
[=] {
const auto box = controller->show(Box(UsernamesBox, session));
box->boxClosing(
) | rpl::start_with_next([=] {
session->api().usernames().requestToCache(session->user());
}, box->lifetime());
},
{ &st::settingsIconMention, kIconLightOrange });
AddSkip(container);