mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Remove unused variables
This commit is contained in:
parent
78e6b3e13f
commit
00e785a3af
23 changed files with 0 additions and 36 deletions
|
@ -57,7 +57,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
namespace {
|
||||
|
||||
constexpr auto kMaxWallPaperSlugLength = 255;
|
||||
constexpr auto kDefaultDimming = 50;
|
||||
|
||||
[[nodiscard]] bool IsValidWallPaperSlug(const QString &slug) {
|
||||
if (slug.isEmpty() || slug.size() > kMaxWallPaperSlugLength) {
|
||||
|
|
|
@ -62,7 +62,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
|
||||
namespace {
|
||||
|
||||
constexpr auto kDiscountDivider = 5.;
|
||||
constexpr auto kUserpicsMax = size_t(3);
|
||||
|
||||
using GiftOption = Data::SubscriptionOption;
|
||||
|
|
|
@ -51,8 +51,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
namespace {
|
||||
|
||||
constexpr auto kPremiumShift = 21. / 240;
|
||||
constexpr auto kReactionsPerRow = 5;
|
||||
constexpr auto kDisabledOpacity = 0.5;
|
||||
constexpr auto kToggleStickerTimeout = 2 * crl::time(1000);
|
||||
constexpr auto kStarOpacityOff = 0.1;
|
||||
constexpr auto kStarOpacityOn = 1.;
|
||||
|
|
|
@ -321,9 +321,6 @@ void Viewport::RendererGL::init(
|
|||
_frameBuffer->bind();
|
||||
_frameBuffer->allocate(kValues * sizeof(GLfloat));
|
||||
_downscaleProgram.yuv420.emplace();
|
||||
const auto downscaleVertexSource = VertexShader({
|
||||
VertexPassTextureCoord(),
|
||||
});
|
||||
_downscaleVertexShader = LinkProgram(
|
||||
&*_downscaleProgram.yuv420,
|
||||
VertexShader({
|
||||
|
|
|
@ -889,7 +889,6 @@ not_null<HistoryItem*> DownloadManager::generateItem(
|
|||
const auto replyTo = FullReplyTo();
|
||||
const auto viaBotId = UserId();
|
||||
const auto date = base::unixtime::now();
|
||||
const auto postAuthor = QString();
|
||||
const auto caption = TextWithEntities();
|
||||
const auto make = [&](const auto media) {
|
||||
return history->makeMessage(
|
||||
|
|
|
@ -15,13 +15,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "apiwrap.h"
|
||||
|
||||
namespace Data {
|
||||
namespace {
|
||||
|
||||
constexpr auto kRefreshDefaultListEach = 60 * 60 * crl::time(1000);
|
||||
constexpr auto kRecentRequestTimeout = 10 * crl::time(1000);
|
||||
constexpr auto kMaxTimeout = 6 * 60 * 60 * crl::time(1000);
|
||||
|
||||
} // namespace
|
||||
|
||||
ForumIcons::ForumIcons(not_null<Session*> owner)
|
||||
: _owner(owner)
|
||||
|
|
|
@ -226,7 +226,6 @@ bool PhotoMedia::setToClipboard() {
|
|||
if (fallback.isNull()) {
|
||||
return false;
|
||||
}
|
||||
const auto bytes = imageBytes(large);
|
||||
auto mime = std::make_unique<QMimeData>();
|
||||
mime->setImageData(std::move(fallback));
|
||||
if (auto bytes = imageBytes(large); !bytes.isEmpty()) {
|
||||
|
|
|
@ -1290,7 +1290,6 @@ void Stories::sendIncrementViewsRequests() {
|
|||
if (_incrementViewsPending.empty()) {
|
||||
return;
|
||||
}
|
||||
auto ids = QVector<MTPint>();
|
||||
struct Prepared {
|
||||
PeerId peer = 0;
|
||||
QVector<MTPint> ids;
|
||||
|
|
|
@ -349,7 +349,6 @@ void CustomEmojiLoader::check() {
|
|||
const auto tag = _tag;
|
||||
const auto sizeOverride = int(_sizeOverride);
|
||||
const auto size = FrameSizeFromTag(_tag, _sizeOverride);
|
||||
auto bytes = Lottie::ReadContent(data, filepath);
|
||||
auto loader = [=] {
|
||||
return std::make_unique<CustomEmojiLoader>(
|
||||
document,
|
||||
|
|
|
@ -36,7 +36,6 @@ constexpr auto kCollapseAfterRatio = 0.68;
|
|||
constexpr auto kFrictionRatio = 0.15;
|
||||
constexpr auto kExpandCatchUpDuration = crl::time(200);
|
||||
constexpr auto kMaxTooltipNames = 3;
|
||||
constexpr auto kStoriesTooltipHideBgOpacity = 0.2;
|
||||
|
||||
[[nodiscard]] int AvailableNameWidth(const style::DialogsStoriesList &st) {
|
||||
const auto &full = st.full;
|
||||
|
|
|
@ -446,7 +446,6 @@ QByteArray SerializeMessage(
|
|||
pushAction("send_payment");
|
||||
push("amount", data.amount);
|
||||
push("currency", data.currency);
|
||||
const auto amount = FormatMoneyAmount(data.amount, data.currency);
|
||||
pushReplyToMsgId("invoice_message_id");
|
||||
if (data.recurringUsed) {
|
||||
push("recurring", "used");
|
||||
|
|
|
@ -442,7 +442,6 @@ void InnerWidget::applyFilter(FilterValue &&value) {
|
|||
}
|
||||
|
||||
void InnerWidget::applySearch(const QString &query) {
|
||||
auto clearQuery = query.trimmed();
|
||||
if (_searchQuery != query) {
|
||||
_searchQuery = query;
|
||||
clearAndRequestLog();
|
||||
|
|
|
@ -28,7 +28,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
namespace HistoryView::Reactions {
|
||||
namespace {
|
||||
|
||||
constexpr auto kDivider = 4;
|
||||
constexpr auto kToggleDuration = crl::time(120);
|
||||
constexpr auto kActivateDuration = crl::time(150);
|
||||
constexpr auto kExpandDuration = crl::time(300);
|
||||
|
|
|
@ -84,7 +84,6 @@ SendDataCommon::SentMessageFields SendGeo::getSentMessageFields() const {
|
|||
}
|
||||
|
||||
SendDataCommon::SentMessageFields SendVenue::getSentMessageFields() const {
|
||||
const auto venueType = QString();
|
||||
return { .media = MTP_messageMediaVenue(
|
||||
_location.toMTP(),
|
||||
MTP_string(_title),
|
||||
|
|
|
@ -36,7 +36,6 @@ namespace {
|
|||
constexpr auto kSuppressRatioAll = 0.2;
|
||||
constexpr auto kSuppressRatioSong = 0.05;
|
||||
constexpr auto kWaveformCounterBufferSize = 256 * 1024;
|
||||
constexpr auto kEffectDestructionDelay = crl::time(1000);
|
||||
|
||||
QMutex AudioMutex;
|
||||
ALCdevice *AudioDevice = nullptr;
|
||||
|
|
|
@ -4879,7 +4879,6 @@ void OverlayWidget::paintControls(
|
|||
const style::icon &icon;
|
||||
bool nonbright = false;
|
||||
};
|
||||
const QRect kEmpty;
|
||||
// When adding / removing controls please update RendererGL.
|
||||
const Control controls[] = {
|
||||
{
|
||||
|
|
|
@ -388,7 +388,6 @@ void FormSummary::setupSuggestedTips(not_null<VerticalLayout*> layout) {
|
|||
st::paymentsTipButtonsPadding);
|
||||
const auto state = outer->lifetime().make_state<State>();
|
||||
for (const auto amount : _invoice.suggestedTips) {
|
||||
const auto text = formatAmount(amount, true);
|
||||
const auto selected = (amount == _invoice.tipsSelected);
|
||||
const auto &st = selected
|
||||
? _tipChosen
|
||||
|
|
|
@ -32,7 +32,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
namespace {
|
||||
|
||||
constexpr auto kShortPollTimeout = 60 * crl::time(1000);
|
||||
constexpr auto kMaxDeviceModelLength = 32;
|
||||
|
||||
using EntryData = Api::Websites::Entry;
|
||||
|
||||
|
|
|
@ -136,7 +136,6 @@ Data::StatisticalChart StatisticalChartFromJSON(const QByteArray &json) {
|
|||
const auto colors = root.value(u"colors"_q).toObject();
|
||||
const auto names = root.value(u"names"_q).toObject();
|
||||
|
||||
const auto colorPattern = u"(.*)(#.*)"_q;
|
||||
for (auto &line : result.lines) {
|
||||
const auto colorIt = colors.constFind(line.idString);
|
||||
if (colorIt != colors.constEnd() && (*colorIt).isString()) {
|
||||
|
|
|
@ -132,7 +132,6 @@ MimeDataState ComputeMimeDataState(const QMimeData *data) {
|
|||
return MimeDataState::None;
|
||||
}
|
||||
|
||||
auto files = QStringList();
|
||||
auto allAreSmallImages = true;
|
||||
for (const auto &url : urls) {
|
||||
if (!url.isLocalFile()) {
|
||||
|
|
|
@ -518,7 +518,6 @@ void Templates::ensureUpdatesCreated() {
|
|||
}
|
||||
|
||||
void Templates::update() {
|
||||
auto errors = QStringList();
|
||||
const auto sendRequest = [&](const QString &path, const QString &url) {
|
||||
ensureUpdatesCreated();
|
||||
if (_updates->requests.find(path) != end(_updates->requests)) {
|
||||
|
|
|
@ -16,11 +16,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "styles/style_chat_helpers.h"
|
||||
|
||||
namespace Ui {
|
||||
namespace {
|
||||
|
||||
constexpr auto kAnimationDuration = crl::time(120);
|
||||
|
||||
} // namespace
|
||||
|
||||
SilentToggle::SilentToggle(QWidget *parent, not_null<ChannelData*> channel)
|
||||
: RippleButton(parent, st::historySilentToggle.ripple)
|
||||
|
|
|
@ -900,7 +900,6 @@ TextWithEntities Manager::ComposeReactionEmoji(
|
|||
return TextWithEntities{ *emoji };
|
||||
}
|
||||
const auto id = v::get<DocumentId>(reaction.data);
|
||||
auto entities = EntitiesInText();
|
||||
const auto document = session->data().document(id);
|
||||
const auto sticker = document->sticker();
|
||||
const auto text = sticker ? sticker->alt : PlaceholderReactionText();
|
||||
|
|
Loading…
Add table
Reference in a new issue