Fix photo changing in settings / groups / channels.

This commit is contained in:
John Preston 2022-03-27 18:55:45 +04:00
parent 49d090bb4c
commit 1bd4595bba
1 changed files with 2 additions and 4 deletions

View File

@ -240,7 +240,7 @@ void UserpicButton::prepare() {
}
setClickHandlerByRole();
if (_role == Role::ChangePhoto) {
if (_role == Role::ChangePhoto || _role == Role::OpenPhoto) {
chosenImages(
) | rpl::start_with_next([=](QImage &&image) {
setImage(std::move(image));
@ -262,9 +262,7 @@ void UserpicButton::setClickHandlerByRole() {
break;
case Role::OpenPhoto:
addClickHandler([=] {
openPeerPhoto();
});
addClickHandler([=] { openPeerPhoto(); });
break;
case Role::OpenProfile: