2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-03 07:56:03 +00:00

Set / suggest / reset a contact personal photo.

This commit is contained in:
John Preston
2022-12-09 16:34:34 +04:00
parent cb99d611f3
commit 5fe9c93cb6
12 changed files with 190 additions and 72 deletions

View File

@@ -296,9 +296,9 @@ void SetupPhoto(
const auto upload = CreateUploadButton(wrap, controller);
upload->chosenImages(
) | rpl::start_with_next([=](QImage &&image) {
UploadPhoto(self, image);
photo->changeTo(std::move(image));
) | rpl::start_with_next([=](Ui::UserpicButton::ChosenImage &&chosen) {
UploadPhoto(self, chosen.image);
photo->changeTo(std::move(chosen.image));
}, upload->lifetime());
const auto name = Ui::CreateChild<Ui::FlatLabel>(