2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

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

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: