mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Fix uploading new group / account photo.
This commit is contained in:
parent
cad6faa790
commit
7e98e9ecf2
5 changed files with 11 additions and 6 deletions
|
@ -467,6 +467,7 @@ void GroupInfoBox::prepare() {
|
||||||
&_navigation->parentController()->window(),
|
&_navigation->parentController()->window(),
|
||||||
Ui::UserpicButton::Role::ChoosePhoto,
|
Ui::UserpicButton::Role::ChoosePhoto,
|
||||||
st::defaultUserpicButton);
|
st::defaultUserpicButton);
|
||||||
|
_photo->showCustomOnChosen();
|
||||||
_title.create(
|
_title.create(
|
||||||
this,
|
this,
|
||||||
st::defaultInputField,
|
st::defaultInputField,
|
||||||
|
|
|
@ -477,6 +477,7 @@ object_ptr<Ui::RpWidget> Controller::createPhotoEdit() {
|
||||||
st::defaultUserpicButton),
|
st::defaultUserpicButton),
|
||||||
st::editPeerPhotoMargins);
|
st::editPeerPhotoMargins);
|
||||||
_controls.photo = photoWrap->entity();
|
_controls.photo = photoWrap->entity();
|
||||||
|
_controls.photo->showCustomOnChosen();
|
||||||
|
|
||||||
return photoWrap;
|
return photoWrap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,8 @@ SignupWidget::SignupWidget(
|
||||||
, _first(this, st::introName, tr::lng_signup_firstname())
|
, _first(this, st::introName, tr::lng_signup_firstname())
|
||||||
, _last(this, st::introName, tr::lng_signup_lastname())
|
, _last(this, st::introName, tr::lng_signup_lastname())
|
||||||
, _invertOrder(langFirstNameGoesSecond()) {
|
, _invertOrder(langFirstNameGoesSecond()) {
|
||||||
|
_photo->showCustomOnChosen();
|
||||||
|
|
||||||
Lang::Updated(
|
Lang::Updated(
|
||||||
) | rpl::start_with_next([=] {
|
) | rpl::start_with_next([=] {
|
||||||
refreshLang();
|
refreshLang();
|
||||||
|
|
|
@ -207,13 +207,13 @@ void UserpicButton::prepare() {
|
||||||
prepareUserpicPixmap();
|
prepareUserpicPixmap();
|
||||||
}
|
}
|
||||||
setClickHandlerByRole();
|
setClickHandlerByRole();
|
||||||
|
}
|
||||||
|
|
||||||
if (_role == Role::ChangePhoto) {
|
void UserpicButton::showCustomOnChosen() {
|
||||||
chosenImages(
|
chosenImages(
|
||||||
) | rpl::start_with_next([=](ChosenImage &&chosen) {
|
) | rpl::start_with_next([=](ChosenImage &&chosen) {
|
||||||
showCustom(std::move(chosen.image));
|
showCustom(std::move(chosen.image));
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UserpicButton::requestSuggestAvailability() {
|
void UserpicButton::requestSuggestAvailability() {
|
||||||
|
|
|
@ -100,6 +100,7 @@ public:
|
||||||
|
|
||||||
void showCustom(QImage &&image);
|
void showCustom(QImage &&image);
|
||||||
void showSource(Source source);
|
void showSource(Source source);
|
||||||
|
void showCustomOnChosen();
|
||||||
|
|
||||||
void overrideHasPersonalPhoto(bool has);
|
void overrideHasPersonalPhoto(bool has);
|
||||||
[[nodiscard]] rpl::producer<> resetPersonalRequests() const;
|
[[nodiscard]] rpl::producer<> resetPersonalRequests() const;
|
||||||
|
|
Loading…
Add table
Reference in a new issue