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

Moved api peer photo processing to separated file.

Removed MainWidget::deletePhotoLayer.
This commit is contained in:
23rd
2021-10-20 19:54:22 +03:00
parent 36d6682122
commit 159beb138a
15 changed files with 294 additions and 213 deletions

View File

@@ -30,7 +30,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_file_origin.h"
#include "data/data_histories.h"
#include "data/stickers/data_stickers.h"
#include "api/api_text_entities.h"
#include "ui/chat/chat_theme.h"
#include "ui/special_buttons.h"
#include "ui/widgets/buttons.h"
@@ -222,7 +221,6 @@ MainWidget::MainWidget(
not_null<Window::SessionController*> controller)
: RpWidget(parent)
, _controller(controller)
, _api(&controller->session().mtp())
, _dialogsWidth(st::columnMinimalWidthLeft)
, _thirdColumnWidth(st::columnMinimalWidthThird)
, _sideShadow(this)
@@ -726,17 +724,6 @@ void MainWidget::showSendPathsLayer() {
}
}
void MainWidget::deletePhotoLayer(PhotoData *photo) {
if (!photo) return;
Ui::show(Box<Ui::ConfirmBox>(
tr::lng_delete_photo_sure(tr::now),
tr::lng_box_delete(tr::now),
crl::guard(this, [=] {
session().api().clearPeerPhoto(photo);
Ui::hideLayer();
})));
}
void MainWidget::shareUrlLayer(const QString &url, const QString &text) {
// Don't allow to insert an inline bot query by share url link.
if (url.trimmed().startsWith('@')) {