mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Removed some include directives.
This commit is contained in:
@@ -34,50 +34,35 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "api/api_user_names.h"
|
||||
#include "api/api_websites.h"
|
||||
#include "data/notify/data_notify_settings.h"
|
||||
#include "data/stickers/data_stickers.h"
|
||||
#include "data/data_drafts.h"
|
||||
#include "data/data_changes.h"
|
||||
#include "data/data_photo.h"
|
||||
#include "data/data_web_page.h"
|
||||
#include "data/data_folder.h"
|
||||
#include "data/data_forum_topic.h"
|
||||
#include "data/data_forum.h"
|
||||
#include "data/data_media_types.h"
|
||||
#include "data/data_sparse_ids.h"
|
||||
#include "data/data_search_controller.h"
|
||||
#include "data/data_scheduled_messages.h"
|
||||
#include "data/data_channel_admins.h"
|
||||
#include "data/data_session.h"
|
||||
#include "data/data_stories.h"
|
||||
#include "data/data_channel.h"
|
||||
#include "data/data_chat.h"
|
||||
#include "data/data_user.h"
|
||||
#include "data/data_cloud_themes.h"
|
||||
#include "data/data_chat_filters.h"
|
||||
#include "data/data_histories.h"
|
||||
#include "data/data_wall_paper.h"
|
||||
#include "data/stickers/data_stickers.h"
|
||||
#include "dialogs/dialogs_key.h"
|
||||
#include "core/core_cloud_password.h"
|
||||
#include "core/application.h"
|
||||
#include "base/unixtime.h"
|
||||
#include "base/random.h"
|
||||
#include "base/qt/qt_common_adapters.h"
|
||||
#include "base/call_delayed.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "mainwindow.h"
|
||||
#include "mainwidget.h"
|
||||
#include "boxes/add_contact_box.h"
|
||||
#include "mtproto/mtproto_config.h"
|
||||
#include "history/history.h"
|
||||
#include "history/history_item.h"
|
||||
#include "history/history_item_components.h"
|
||||
#include "history/history_item_helpers.h"
|
||||
#include "main/main_session.h"
|
||||
#include "main/main_session_settings.h"
|
||||
#include "main/main_account.h"
|
||||
#include "ui/boxes/confirm_box.h"
|
||||
#include "boxes/stickers_box.h"
|
||||
#include "boxes/sticker_set_box.h"
|
||||
#include "boxes/premium_limits_box.h"
|
||||
#include "window/notifications_manager.h"
|
||||
@@ -88,7 +73,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "chat_helpers/message_field.h"
|
||||
#include "ui/item_text_options.h"
|
||||
#include "ui/text/text_utilities.h"
|
||||
#include "ui/emoji_config.h"
|
||||
#include "ui/chat/attach/attach_prepare.h"
|
||||
#include "ui/toast/toast.h"
|
||||
#include "support/support_helper.h"
|
||||
@@ -96,9 +80,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "storage/localimageloader.h"
|
||||
#include "storage/download_manager_mtproto.h"
|
||||
#include "storage/file_upload.h"
|
||||
#include "storage/storage_facade.h"
|
||||
#include "storage/storage_shared_media.h"
|
||||
#include "storage/storage_media_prepare.h"
|
||||
#include "storage/storage_account.h"
|
||||
|
||||
namespace {
|
||||
@@ -148,6 +129,15 @@ void ShowChannelsLimitBox(not_null<PeerData*> peer) {
|
||||
}
|
||||
}
|
||||
|
||||
[[nodiscard]] FileLoadTo FileLoadTaskOptions(const Api::SendAction &action) {
|
||||
const auto peer = action.history->peer;
|
||||
return FileLoadTo(
|
||||
peer->id,
|
||||
action.options,
|
||||
action.replyTo,
|
||||
action.replaceMediaOf);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
ApiWrap::ApiWrap(not_null<Main::Session*> session)
|
||||
@@ -2061,13 +2051,13 @@ void ApiWrap::deleteHistory(
|
||||
|
||||
void ApiWrap::applyUpdates(
|
||||
const MTPUpdates &updates,
|
||||
uint64 sentMessageRandomId) {
|
||||
uint64 sentMessageRandomId) const {
|
||||
this->updates().applyUpdates(updates, sentMessageRandomId);
|
||||
}
|
||||
|
||||
int ApiWrap::applyAffectedHistory(
|
||||
PeerData *peer,
|
||||
const MTPmessages_AffectedHistory &result) {
|
||||
const MTPmessages_AffectedHistory &result) const {
|
||||
const auto &data = result.c_messages_affectedHistory();
|
||||
if (const auto channel = peer ? peer->asChannel() : nullptr) {
|
||||
channel->ptsUpdateAndApply(data.vpts().v, data.vpts_count().v);
|
||||
@@ -2089,7 +2079,7 @@ void ApiWrap::applyAffectedMessages(
|
||||
}
|
||||
|
||||
void ApiWrap::applyAffectedMessages(
|
||||
const MTPmessages_AffectedMessages &result) {
|
||||
const MTPmessages_AffectedMessages &result) const {
|
||||
const auto &data = result.c_messages_affectedMessages();
|
||||
updates().updateAndApply(data.vpts().v, data.vpts_count().v);
|
||||
}
|
||||
@@ -3435,7 +3425,7 @@ void ApiWrap::sendVoiceMessage(
|
||||
crl::time duration,
|
||||
const SendAction &action) {
|
||||
const auto caption = TextWithTags();
|
||||
const auto to = fileLoadTaskOptions(action);
|
||||
const auto to = FileLoadTaskOptions(action);
|
||||
_fileLoader->addTask(std::make_unique<FileLoadTask>(
|
||||
&session(),
|
||||
result,
|
||||
@@ -3453,7 +3443,7 @@ void ApiWrap::editMedia(
|
||||
if (list.files.empty()) return;
|
||||
|
||||
auto &file = list.files.front();
|
||||
const auto to = fileLoadTaskOptions(action);
|
||||
const auto to = FileLoadTaskOptions(action);
|
||||
_fileLoader->addTask(std::make_unique<FileLoadTask>(
|
||||
&session(),
|
||||
file.path,
|
||||
@@ -3482,7 +3472,7 @@ void ApiWrap::sendFiles(
|
||||
sendMessage(std::move(message));
|
||||
}
|
||||
|
||||
const auto to = fileLoadTaskOptions(action);
|
||||
const auto to = FileLoadTaskOptions(action);
|
||||
if (album) {
|
||||
album->options = to.options;
|
||||
}
|
||||
@@ -3521,7 +3511,7 @@ void ApiWrap::sendFile(
|
||||
const QByteArray &fileContent,
|
||||
SendMediaType type,
|
||||
const SendAction &action) {
|
||||
const auto to = fileLoadTaskOptions(action);
|
||||
const auto to = FileLoadTaskOptions(action);
|
||||
auto caption = TextWithTags();
|
||||
const auto spoiler = false;
|
||||
const auto information = nullptr;
|
||||
@@ -4180,15 +4170,6 @@ void ApiWrap::sendAlbumIfReady(not_null<SendingAlbum*> album) {
|
||||
});
|
||||
}
|
||||
|
||||
FileLoadTo ApiWrap::fileLoadTaskOptions(const SendAction &action) const {
|
||||
const auto peer = action.history->peer;
|
||||
return FileLoadTo(
|
||||
peer->id,
|
||||
action.options,
|
||||
action.replyTo,
|
||||
action.replaceMediaOf);
|
||||
}
|
||||
|
||||
void ApiWrap::reloadContactSignupSilent() {
|
||||
if (_contactSignupSilentRequestId) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user