mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 22:55:11 +00:00
Allow topic deletion.
This commit is contained in:
@@ -25,7 +25,7 @@ AttachedStickers::AttachedStickers(not_null<ApiWrap*> api)
|
||||
void AttachedStickers::request(
|
||||
not_null<Window::SessionController*> controller,
|
||||
MTPmessages_GetAttachedStickers &&mtpRequest) {
|
||||
const auto weak = base::make_weak(controller.get());
|
||||
const auto weak = base::make_weak(controller);
|
||||
_api.request(_requestId).cancel();
|
||||
_requestId = _api.request(
|
||||
std::move(mtpRequest)
|
||||
|
@@ -83,7 +83,7 @@ void SendBotCallbackData(
|
||||
if (withPassword) {
|
||||
flags |= MTPmessages_GetBotCallbackAnswer::Flag::f_password;
|
||||
}
|
||||
const auto weak = base::make_weak(controller.get());
|
||||
const auto weak = base::make_weak(controller);
|
||||
const auto show = std::make_shared<Window::Show>(controller);
|
||||
button->requestId = api->request(MTPmessages_GetBotCallbackAnswer(
|
||||
MTP_flags(flags),
|
||||
@@ -202,7 +202,7 @@ void SendBotCallbackDataWithPassword(
|
||||
return;
|
||||
}
|
||||
api->cloudPassword().reload();
|
||||
const auto weak = base::make_weak(controller.get());
|
||||
const auto weak = base::make_weak(controller);
|
||||
const auto show = std::make_shared<Window::Show>(controller);
|
||||
SendBotCallbackData(controller, item, row, column, std::nullopt, [=](const QString &error) {
|
||||
auto box = PrePasswordErrorBox(
|
||||
|
@@ -107,7 +107,7 @@ void CheckChatInvite(
|
||||
const QString &hash,
|
||||
ChannelData *invitePeekChannel) {
|
||||
const auto session = &controller->session();
|
||||
const auto weak = base::make_weak(controller.get());
|
||||
const auto weak = base::make_weak(controller);
|
||||
session->api().checkChatInvite(hash, [=](const MTPChatInvite &result) {
|
||||
Core::App().hideMediaView();
|
||||
result.match([=](const MTPDchatInvite &data) {
|
||||
|
@@ -66,7 +66,7 @@ void ToggleFavedSticker(
|
||||
if (faved && !document->sticker()) {
|
||||
return;
|
||||
}
|
||||
const auto weak = base::make_weak(controller.get());
|
||||
const auto weak = base::make_weak(controller);
|
||||
auto done = [=] {
|
||||
document->owner().stickers().setFaved(weak.get(), document, faved);
|
||||
};
|
||||
|
Reference in New Issue
Block a user