Fixed display of new chat photo after applying.

This commit is contained in:
23rd 2023-01-31 14:31:05 +03:00 committed by John Preston
parent 322cbc5ed0
commit 48b783f6a0
1 changed files with 2 additions and 3 deletions

View File

@ -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));