From 48b783f6a0a35cf3c4ffab28ea2dfadfa07a02de Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Tue, 31 Jan 2023 14:31:05 +0300 Subject: [PATCH] Fixed display of new chat photo after applying. --- Telegram/SourceFiles/info/profile/info_profile_cover.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/info/profile/info_profile_cover.cpp b/Telegram/SourceFiles/info/profile/info_profile_cover.cpp index 4a512e274d..f92dffdbc2 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_cover.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_cover.cpp @@ -443,15 +443,14 @@ void Cover::refreshUploadPhotoOverlay() { Unexpected("Peer type in Info::Profile::Cover."); }(), [=](Ui::UserpicButton::ChosenImage chosen) { using ChosenType = Ui::UserpicButton::ChosenType; - auto &image = chosen.image; auto result = Api::PeerPhoto::UserPhoto{ - std::move(image), + base::take(chosen.image), chosen.markup.documentId, chosen.markup.colors, }; switch (chosen.type) { case ChosenType::Set: - _userpic->showCustom(base::duplicate(image)); + _userpic->showCustom(base::duplicate(result.image)); _peer->session().api().peerPhoto().upload( _peer, std::move(result));