2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Replaced old photo crop box with photo editor for profile photos.

This commit is contained in:
23rd
2021-02-22 05:10:27 +03:00
parent a996b14291
commit 17465e1082
8 changed files with 162 additions and 113 deletions

View File

@@ -14,6 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_channel.h"
#include "data/data_chat.h"
#include "data/data_changes.h"
#include "editor/photo_editor_layer_widget.h"
#include "info/profile/info_profile_values.h"
#include "info/info_controller.h"
#include "info/info_memento.h"
@@ -269,6 +270,13 @@ Cover::Cover(
initViewers(std::move(title));
setupChildGeometry();
_userpic->uploadPhotoRequests(
) | rpl::start_with_next([=] {
_peer->session().api().uploadPeerPhoto(
_peer,
_userpic->takeResultImage());
}, _userpic->lifetime());
}
void Cover::setupChildGeometry() {