Removed unused simple sendExistingDocument methods from sections.

This commit is contained in:
23rd 2024-08-22 16:55:51 +03:00
parent f0209c9d6e
commit 679350e23d
6 changed files with 7 additions and 25 deletions

View file

@ -1325,11 +1325,6 @@ void RepliesWidget::refreshJoinGroupButton() {
}
}
void RepliesWidget::sendExistingDocument(
not_null<DocumentData*> document) {
sendExistingDocument(document, {}, std::nullopt);
}
bool RepliesWidget::sendExistingDocument(
not_null<DocumentData*> document,
Api::SendOptions options,

View file

@ -301,7 +301,6 @@ private:
Api::SendOptions options,
bool ctrlShiftEnter);
void sendExistingDocument(not_null<DocumentData*> document);
bool sendExistingDocument(
not_null<DocumentData*> document,
Api::SendOptions options,

View file

@ -340,7 +340,12 @@ void ScheduledWidget::setupComposeControls() {
_composeControls->fileChosen(
) | rpl::start_with_next([=](ChatHelpers::FileChosen data) {
controller()->hideLayer(anim::type::normal);
sendExistingDocument(data.document);
const auto document = data.document;
const auto callback = crl::guard(this, [=](Api::SendOptions options) {
sendExistingDocument(document, options);
});
controller()->show(
PrepareScheduleBox(this, _show, sendMenuDetails(), callback));
}, lifetime());
_composeControls->photoChosen(
@ -808,15 +813,6 @@ void ScheduledWidget::edit(
_composeControls->focus();
}
void ScheduledWidget::sendExistingDocument(
not_null<DocumentData*> document) {
const auto callback = [=](Api::SendOptions options) {
sendExistingDocument(document, options);
};
controller()->show(
PrepareScheduleBox(this, _show, sendMenuDetails(), callback));
}
bool ScheduledWidget::sendExistingDocument(
not_null<DocumentData*> document,
Api::SendOptions options) {

View file

@ -251,7 +251,6 @@ private:
Api::SendOptions options,
bool ctrlShiftEnter);
void sendExistingDocument(not_null<DocumentData*> document);
bool sendExistingDocument(
not_null<DocumentData*> document,
Api::SendOptions options);

View file

@ -118,7 +118,6 @@ private:
bool ctrlShiftEnter);
void finishSending(bool skipToast = false);
void sendExistingDocument(not_null<DocumentData*> document);
bool sendExistingDocument(
not_null<DocumentData*> document,
Api::SendOptions options,

View file

@ -214,7 +214,6 @@ private:
Api::SendOptions options,
bool ctrlShiftEnter);
void sendExistingDocument(not_null<DocumentData*> document);
bool sendExistingDocument(
not_null<DocumentData*> document,
Api::SendOptions options,
@ -696,7 +695,7 @@ void ShortcutMessages::setupComposeControls() {
_composeControls->fileChosen(
) | rpl::start_with_next([=](ChatHelpers::FileChosen data) {
_controller->hideLayer(anim::type::normal);
sendExistingDocument(data.document);
sendExistingDocument(data.document, {}, std::nullopt);
}, lifetime());
_composeControls->photoChosen(
@ -1494,11 +1493,6 @@ void ShortcutMessages::doSetInnerFocus() {
}
}
void ShortcutMessages::sendExistingDocument(
not_null<DocumentData*> document) {
sendExistingDocument(document, {}, std::nullopt);
}
bool ShortcutMessages::sendExistingDocument(
not_null<DocumentData*> document,
Api::SendOptions options,