mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Remove unused variable
The following are commits related to removed variables. apiwrap.cppe050e27
: kSaveDraftBeforeQuitTimeout app.cpp113f665
: serviceImageCacheSize boxes/auto_download_box.cppa0c6104
: checked(Source source, Type type) boxes/background_preview_box.cppb6edf45
: resultBytesPerPixelfe21b5a
: ms boxes/calendar_box.cppae97704
: yearIndex, monthIndex99bb093
: ms boxes/connection_box.cppf794d8d
: ping boxes/dictionaries_manager.cpp8353867
: session boxes/peer_list_box.cpp2ce2a14
: grayedWidth boxes/peers/add_participants_box.cpp07e010d
: chat, channel boxes/self_destruction_box.cppfe9f02e
: count chat_helpers/emoji_suggestions_widget.cppa12bc60
: is(QLatin1String string) chat_helpers/field_autocomplete.cpp8c7a35c
: atwidth, hashwidth chat_helpers/gifs_list_widget.cppff65734
: inlineItems3d846fc
: newSelectedd1687ab
: kSaveDraftBeforeQuitTimeout chat_helpers/stickers_dice_pack.cppc83e297
: kZeroDiceDocumentId chat_helpers/stickers_emoji_pack.cppd298953
: length chat_helpers/stickers_list_widget.cppeb75859
: index, x core/crash_reports.cpp5940ae6
: LaunchedDateTimeStr, LaunchedBinaryName data/data_changes.cpp 3c4e959:clearRealtime data/data_cloud_file.cpp4b354b0
: fromCloud, cacheTag data/data_document_media.cpp7db5359
: kMaxVideoFrameArea data/data_messages.cpp794e315
: wasCount data/data_photo_media.cppe27d2bc
: index data/data_wall_paper.cppb6edf45
: resultBytesPerPixel data/data_types.cppaa8f62d
: kWebDocumentCacheTag, kStorageCacheMask history/admin_log/history_admin_log_inner.cpp794e315
: canDelete, canForward history/history_location_manager.cpp60f45ab
: kCoordPrecision9f90d3a
: kMaxHttpRedirects history/history_message.cppcedf8a6
: kPinnedMessageTextLimit history/history_widget.cppb305924
: serviceColorefa5fc4
: hasForward5e7aa4f
: kTabbedSelectorToggleTooltipTimeoutMs, kTabbedSelectorToggleTooltipCount history/view/history_view_context_menu.cppfe1a90b
: isVideoLink, isVoiceLink, isAudioLink settings.cppe2f54eb
: defaultRecent settings/settings_folders.cppe8bf5bb
: kRefreshSuggestedTimeout ui/filter_icon_panel.cppc4a0bc1
: kDelayedHideTimeoutMs window/themes/window_theme_preview.cppef927c8
: mutedCounter ----- Modified variables boxes/stickers_box.cpp554eb3a
: _rows[pressedIndex] -> set data/data_notify_settings.cpp734c410
: muteForSeconds -> muteUntil history/view/history_view_list_widget.cpp07528be
: _items[index] -> viewe5f3bed
: fromState, tillState history/history.cppcd3c1c6
: kStatusShowClientsideRecordVideo -> kStatusShowClientsideRecordVoice storage/download_manager_mtproto.cppae8fb14
: _queues[dcId] -> queue storage/localstorage.cpp357caf8
: MTP::Environment::Production -> production
This commit is contained in:
parent
c61cabb075
commit
556aa28df6
39 changed files with 12 additions and 121 deletions
|
@ -83,9 +83,6 @@ constexpr auto kReloadChannelMembersTimeout = 1000;
|
|||
// Save draft to the cloud with 1 sec extra delay.
|
||||
constexpr auto kSaveCloudDraftTimeout = 1000;
|
||||
|
||||
// Give the app 1.5 secs to save drafts to cloud when quitting.
|
||||
constexpr auto kSaveDraftBeforeQuitTimeout = 1500;
|
||||
|
||||
// Max users in one super group invite request.
|
||||
constexpr auto kMaxUsersPerInvite = 100;
|
||||
|
||||
|
|
|
@ -74,8 +74,6 @@ using CornersMap = QMap<uint32, CornersPixmaps>;
|
|||
CornersMap cornersMap;
|
||||
QImage cornersMaskLarge[4], cornersMaskSmall[4];
|
||||
|
||||
int32 serviceImageCacheSize = 0;
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace App {
|
||||
|
|
|
@ -97,9 +97,6 @@ void AutoDownloadBox::setupContent() {
|
|||
setTitle(tr::lng_profile_settings_section());
|
||||
|
||||
const auto settings = &_session->settings().autoDownload();
|
||||
const auto checked = [=](Source source, Type type) {
|
||||
return (settings->bytesLimit(source, type) > 0);
|
||||
};
|
||||
|
||||
auto wrap = object_ptr<Ui::VerticalLayout>(this);
|
||||
const auto content = wrap.data();
|
||||
|
|
|
@ -348,7 +348,6 @@ QImage ColorizePattern(QImage image, QColor color) {
|
|||
const auto height = image.height();
|
||||
const auto pattern = anim::shifted(color);
|
||||
|
||||
const auto resultBytesPerPixel = (image.depth() >> 3);
|
||||
constexpr auto resultIntsPerPixel = 1;
|
||||
const auto resultIntsPerLine = (image.bytesPerLine() >> 2);
|
||||
const auto resultIntsAdded = resultIntsPerLine - width * resultIntsPerPixel;
|
||||
|
@ -744,7 +743,6 @@ void BackgroundPreviewBox::checkLoadedDocument() {
|
|||
guard = _generating.make_guard()
|
||||
]() mutable {
|
||||
auto scaled = PrepareScaledFromFull(image, patternBackground);
|
||||
const auto ms = crl::now();
|
||||
auto blurred = patternBackground
|
||||
? QImage()
|
||||
: PrepareScaledNonPattern(
|
||||
|
|
|
@ -122,8 +122,6 @@ void CalendarBox::Context::applyMonth(const QDate &month, bool forced) {
|
|||
_daysCount = month.daysInMonth();
|
||||
_daysShift = daysShiftForMonth(month);
|
||||
_rowsCount = rowsCountForMonth(month);
|
||||
auto yearIndex = month.year();
|
||||
auto monthIndex = month.month();
|
||||
_highlightedIndex = month.daysTo(_highlighted);
|
||||
_minDayIndex = _min.isNull() ? INT_MIN : month.daysTo(_min);
|
||||
_maxDayIndex = _max.isNull() ? INT_MAX : month.daysTo(_max);
|
||||
|
@ -302,7 +300,6 @@ int CalendarBox::Inner::rowsTop() const {
|
|||
|
||||
void CalendarBox::Inner::paintRows(Painter &p, QRect clip) {
|
||||
p.setFont(st::calendarDaysFont);
|
||||
auto ms = crl::now();
|
||||
auto y = rowsTop();
|
||||
auto index = -_context->daysShift();
|
||||
auto highlightedIndex = _context->highlightedIndex();
|
||||
|
|
|
@ -1415,7 +1415,6 @@ auto ProxiesBoxController::views() const -> rpl::producer<ItemView> {
|
|||
}
|
||||
|
||||
void ProxiesBoxController::updateView(const Item &item) {
|
||||
const auto ping = 0;
|
||||
const auto selected = (Global::SelectedProxy() == item.data);
|
||||
const auto deleted = item.deleted;
|
||||
const auto type = [&] {
|
||||
|
|
|
@ -388,7 +388,6 @@ void ManageDictionariesBox::setInnerFocus() {
|
|||
void ManageDictionariesBox::prepare() {
|
||||
const auto multiSelect = CreateMultiSelect(this);
|
||||
|
||||
const auto session = &_controller->session();
|
||||
const auto inner = setInnerWidget(
|
||||
object_ptr<Inner>(
|
||||
this,
|
||||
|
|
|
@ -1299,7 +1299,6 @@ crl::time PeerListContent::paintRow(
|
|||
p.drawTextLeft(_st.item.statusPosition.x(), _st.item.statusPosition.y(), width(), highlightedPart);
|
||||
} else {
|
||||
grayedPart = st::contactsStatusFont->elided(grayedPart, availableWidth - highlightedWidth);
|
||||
auto grayedWidth = st::contactsStatusFont->width(grayedPart);
|
||||
p.setPen(_st.item.statusFgActive);
|
||||
p.drawTextLeft(_st.item.statusPosition.x(), _st.item.statusPosition.y(), width(), highlightedPart);
|
||||
p.setPen(selected ? _st.item.statusFgOver : _st.item.statusFg);
|
||||
|
|
|
@ -654,8 +654,6 @@ void AddSpecialBoxController::showRestricted(
|
|||
_editParticipantBox->closeBox();
|
||||
}
|
||||
|
||||
const auto chat = _peer->asChat();
|
||||
const auto channel = _peer->asChannel();
|
||||
const auto showRestrictedSure = crl::guard(this, [=] {
|
||||
showRestricted(user, true);
|
||||
});
|
||||
|
|
|
@ -62,7 +62,6 @@ void SelfDestructionBox::showContent() {
|
|||
_description->moveToLeft(st::boxPadding.left(), y);
|
||||
y += _description->height() + st::boxMediumSkip;
|
||||
|
||||
const auto count = int(_ttlValues.size());
|
||||
for (const auto value : _ttlValues) {
|
||||
const auto button = Ui::CreateChild<Ui::Radiobutton>(
|
||||
this,
|
||||
|
|
|
@ -1435,12 +1435,12 @@ void StickersBox::Inner::setPressed(SelectedRow pressed) {
|
|||
update(0, _itemsTop + pressedIndex * _rowHeight, width(), _rowHeight);
|
||||
auto &set = _rows[pressedIndex];
|
||||
auto rippleMask = Ui::RippleAnimation::rectMask(QSize(width(), _rowHeight));
|
||||
if (!_rows[pressedIndex]->ripple) {
|
||||
_rows[pressedIndex]->ripple = std::make_unique<Ui::RippleAnimation>(st::contactsRipple, std::move(rippleMask), [this, pressedIndex] {
|
||||
if (!set->ripple) {
|
||||
set->ripple = std::make_unique<Ui::RippleAnimation>(st::contactsRipple, std::move(rippleMask), [this, pressedIndex] {
|
||||
update(0, _itemsTop + pressedIndex * _rowHeight, width(), _rowHeight);
|
||||
});
|
||||
}
|
||||
_rows[pressedIndex]->ripple->add(mapFromGlobal(QCursor::pos()) - QPoint(0, _itemsTop + pressedIndex * _rowHeight));
|
||||
set->ripple->add(mapFromGlobal(QCursor::pos()) - QPoint(0, _itemsTop + pressedIndex * _rowHeight));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -698,9 +698,6 @@ QString SuggestionsController::getEmojiQuery() {
|
|||
cursor.movePosition(QTextCursor::End);
|
||||
return cursor.position();
|
||||
}();
|
||||
const auto is = [&](QLatin1String string) {
|
||||
return (text.compare(string, Qt::CaseInsensitive) == 0);
|
||||
};
|
||||
if (!_options.suggestExactFirstWord
|
||||
|| !length
|
||||
|| text[0].isSpace()
|
||||
|
|
|
@ -620,8 +620,6 @@ void FieldAutocompleteInner::paintEvent(QPaintEvent *e) {
|
|||
QRect r(e->rect());
|
||||
if (r != rect()) p.setClipRect(r);
|
||||
|
||||
auto atwidth = st::mentionFont->width('@');
|
||||
auto hashwidth = st::mentionFont->width('#');
|
||||
auto mentionleft = 2 * st::mentionPadding.left() + st::mentionPhotoSize;
|
||||
auto mentionwidth = width()
|
||||
- mentionleft
|
||||
|
|
|
@ -36,7 +36,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
namespace ChatHelpers {
|
||||
namespace {
|
||||
|
||||
constexpr auto kSaveChosenTabTimeout = 1000;
|
||||
constexpr auto kSearchRequestDelay = 400;
|
||||
constexpr auto kInlineItemsMaxPerRow = 5;
|
||||
constexpr auto kSearchBotUsername = "gif"_cs;
|
||||
|
@ -803,7 +802,6 @@ bool GifsListWidget::inlineItemVisible(const InlineBots::Layout::ItemBase *layou
|
|||
auto col = position % MatrixRowShift;
|
||||
Assert((row < _rows.size()) && (col < _rows[row].items.size()));
|
||||
|
||||
auto &inlineItems = _rows[row].items;
|
||||
auto top = 0;
|
||||
for (auto i = 0; i != row; ++i) {
|
||||
top += _rows[i].height;
|
||||
|
@ -952,9 +950,7 @@ void GifsListWidget::updateSelected() {
|
|||
return;
|
||||
}
|
||||
|
||||
auto newSelected = -1;
|
||||
auto p = mapFromGlobal(_lastMousePos);
|
||||
|
||||
int sx = (rtl() ? width() - p.x() : p.x()) - (st::inlineResultsLeft - st::buttonRadius);
|
||||
int sy = p.y() - st::stickerPanPadding;
|
||||
int row = -1, col = -1, sel = -1;
|
||||
|
|
|
@ -19,11 +19,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include <QtCore/QFileInfo>
|
||||
|
||||
namespace Stickers {
|
||||
namespace {
|
||||
|
||||
constexpr auto kZeroDiceDocumentId = 0xa3b83c9f84fa9e83ULL;
|
||||
|
||||
} // namespace
|
||||
|
||||
DicePack::DicePack(not_null<Main::Session*> session, const QString &emoji)
|
||||
: _session(session)
|
||||
|
|
|
@ -130,7 +130,6 @@ EmojiPack::EmojiPack(not_null<Main::Session*> session)
|
|||
EmojiPack::~EmojiPack() = default;
|
||||
|
||||
bool EmojiPack::add(not_null<HistoryItem*> item) {
|
||||
auto length = 0;
|
||||
if (const auto emoji = item->isolatedEmoji()) {
|
||||
_items[emoji].emplace(item);
|
||||
return true;
|
||||
|
@ -141,7 +140,6 @@ bool EmojiPack::add(not_null<HistoryItem*> item) {
|
|||
void EmojiPack::remove(not_null<const HistoryItem*> item) {
|
||||
Expects(item->isIsolatedEmoji());
|
||||
|
||||
auto length = 0;
|
||||
const auto emoji = item->isolatedEmoji();
|
||||
const auto i = _items.find(emoji);
|
||||
Assert(i != end(_items));
|
||||
|
|
|
@ -256,8 +256,6 @@ StickersListWidget::Footer::Footer(not_null<StickersListWidget*> parent)
|
|||
void StickersListWidget::Footer::clearHeavyData() {
|
||||
const auto count = int(_icons.size());
|
||||
const auto iconsX = qRound(_iconsX.current());
|
||||
const auto index = iconsX / st::stickerIconWidth;
|
||||
const auto x = _iconsLeft - (iconsX % st::stickerIconWidth);
|
||||
const auto first = floorclamp(iconsX, st::stickerIconWidth, 0, count);
|
||||
const auto last = ceilclamp(
|
||||
iconsX + width(),
|
||||
|
|
|
@ -65,8 +65,6 @@ AnnotationRefs ProcessAnnotationRefs;
|
|||
QString ReportPath;
|
||||
FILE *ReportFile = nullptr;
|
||||
int ReportFileNo = 0;
|
||||
char LaunchedDateTimeStr[32] = { 0 };
|
||||
char LaunchedBinaryName[256] = { 0 };
|
||||
|
||||
void SafeWriteChar(char ch) {
|
||||
fwrite(&ch, 1, 1, ReportFile);
|
||||
|
|
|
@ -33,7 +33,6 @@ template <typename DataType, typename UpdateType>
|
|||
void Changes::Manager<DataType, UpdateType>::sendRealtimeNotifications(
|
||||
not_null<DataType*> data,
|
||||
Flags flags) {
|
||||
auto clearRealtime = false;
|
||||
for (auto i = 0; i != kCount; ++i) {
|
||||
const auto flag = static_cast<Flag>(1U << i);
|
||||
if (flags & flag) {
|
||||
|
|
|
@ -100,8 +100,6 @@ bool CloudImage::failed() const {
|
|||
}
|
||||
|
||||
void CloudImage::load(not_null<Main::Session*> session, FileOrigin origin) {
|
||||
const auto fromCloud = LoadFromCloudOrLocal;
|
||||
const auto cacheTag = kImageCacheTag;
|
||||
const auto autoLoading = false;
|
||||
const auto finalCheck = [=] {
|
||||
if (const auto active = activeView()) {
|
||||
|
|
|
@ -33,7 +33,6 @@ namespace {
|
|||
|
||||
constexpr auto kReadAreaLimit = 12'032 * 9'024;
|
||||
constexpr auto kWallPaperThumbnailLimit = 960;
|
||||
constexpr auto kMaxVideoFrameArea = 7'680 * 4'320;
|
||||
constexpr auto kGoodThumbQuality = 87;
|
||||
|
||||
enum class FileType {
|
||||
|
|
|
@ -98,7 +98,6 @@ void MessagesList::addRange(
|
|||
bool incrementCount) {
|
||||
Expects(!count || !incrementCount);
|
||||
|
||||
auto wasCount = _count;
|
||||
auto update = MessagesSliceUpdate();
|
||||
auto result = addRangeItemsAndCountNew(
|
||||
update,
|
||||
|
|
|
@ -178,7 +178,7 @@ bool NotifySettings::change(
|
|||
MTP_flags(flags),
|
||||
MTPBool(),
|
||||
silentPosts ? MTP_bool(*silentPosts) : MTPBool(),
|
||||
muteForSeconds ? MTP_int(base::unixtime::now() + *muteForSeconds) : MTPint(),
|
||||
MTP_int(muteUntil),
|
||||
MTPstring()));
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,6 @@ float64 PhotoMedia::progress() const {
|
|||
void PhotoMedia::automaticLoad(
|
||||
Data::FileOrigin origin,
|
||||
const HistoryItem *item) {
|
||||
const auto index = PhotoSizeIndex(PhotoSize::Large);
|
||||
if (!item || loaded() || _owner->cancelled()) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -21,8 +21,6 @@ constexpr auto kDocumentCacheTag = 0x0000000000000100ULL;
|
|||
constexpr auto kDocumentCacheMask = 0x00000000000000FFULL;
|
||||
constexpr auto kDocumentThumbCacheTag = 0x0000000000000200ULL;
|
||||
constexpr auto kDocumentThumbCacheMask = 0x00000000000000FFULL;
|
||||
constexpr auto kStorageCacheTag = 0x0000010000000000ULL;
|
||||
constexpr auto kStorageCacheMask = 0x000000FFFFFFFFFFULL;
|
||||
constexpr auto kWebDocumentCacheTag = 0x0000020000000000ULL;
|
||||
constexpr auto kWebDocumentCacheMask = 0x000000FFFFFFFFFFULL;
|
||||
constexpr auto kUrlCacheTag = 0x0000030000000000ULL;
|
||||
|
|
|
@ -544,7 +544,6 @@ QImage PreparePatternImage(
|
|||
const auto patternBg = anim::shifted(bg);
|
||||
const auto patternFg = anim::shifted(fg);
|
||||
|
||||
const auto resultBytesPerPixel = (image.depth() >> 3);
|
||||
constexpr auto resultIntsPerPixel = 1;
|
||||
const auto resultIntsPerLine = (image.bytesPerLine() >> 2);
|
||||
const auto resultIntsAdded = resultIntsPerLine - width * resultIntsPerPixel;
|
||||
|
|
|
@ -1105,8 +1105,6 @@ void InnerWidget::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
|||
} else { // maybe cursor on some text history item?
|
||||
const auto item = view ? view->data().get() : nullptr;
|
||||
const auto itemId = item ? item->fullId() : FullMsgId();
|
||||
bool canDelete = item && item->canDelete() && (item->id > 0 || !item->serviceMsg());
|
||||
bool canForward = item && item->allowsForward();
|
||||
|
||||
auto msg = dynamic_cast<HistoryMessage*>(item);
|
||||
if (isUponSelected > 0) {
|
||||
|
|
|
@ -375,7 +375,7 @@ bool History::updateSendActionNeedsAnimating(
|
|||
}, [&](const MTPDsendMessageRecordVideoAction &) {
|
||||
emplaceAction(Type::RecordVideo, kStatusShowClientsideRecordVideo);
|
||||
}, [&](const MTPDsendMessageRecordAudioAction &) {
|
||||
emplaceAction(Type::RecordVoice, kStatusShowClientsideRecordVideo);
|
||||
emplaceAction(Type::RecordVoice, kStatusShowClientsideRecordVoice);
|
||||
}, [&](const MTPDsendMessageRecordRoundAction &) {
|
||||
emplaceAction(Type::RecordRound, kStatusShowClientsideRecordRound);
|
||||
}, [&](const MTPDsendMessageGeoLocationAction &) {
|
||||
|
|
|
@ -14,13 +14,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "data/data_file_origin.h"
|
||||
#include "platform/platform_specific.h"
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr auto kCoordPrecision = 8;
|
||||
constexpr auto kMaxHttpRedirects = 5;
|
||||
|
||||
} // namespace
|
||||
|
||||
QString LocationClickHandler::copyToClipboardText() const {
|
||||
return _text;
|
||||
}
|
||||
|
|
|
@ -52,8 +52,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
|
||||
namespace {
|
||||
|
||||
constexpr auto kPinnedMessageTextLimit = 16;
|
||||
|
||||
[[nodiscard]] MTPDmessage::Flags NewForwardedFlags(
|
||||
not_null<PeerData*> peer,
|
||||
UserId from,
|
||||
|
|
|
@ -118,8 +118,6 @@ namespace {
|
|||
constexpr auto kMessagesPerPageFirst = 30;
|
||||
constexpr auto kMessagesPerPage = 50;
|
||||
constexpr auto kPreloadHeightsCount = 3; // when 3 screens to scroll left make a preload request
|
||||
constexpr auto kTabbedSelectorToggleTooltipTimeoutMs = 3000;
|
||||
constexpr auto kTabbedSelectorToggleTooltipCount = 3;
|
||||
constexpr auto kScrollToVoiceAfterScrolledMs = 1000;
|
||||
constexpr auto kSkipRepaintWhileScrollMs = 100;
|
||||
constexpr auto kShowMembersDropdownTimeoutMs = 300;
|
||||
|
@ -6695,9 +6693,6 @@ void HistoryWidget::drawField(Painter &p, const QRect &rect) {
|
|||
if (!drawWebPagePreview) {
|
||||
const auto firstItem = _toForward.front();
|
||||
const auto firstMedia = firstItem->media();
|
||||
const auto serviceColor = (_toForward.size() > 1)
|
||||
|| (firstMedia != nullptr)
|
||||
|| firstItem->serviceMsg();
|
||||
const auto preview = (_toForward.size() < 2 && firstMedia && firstMedia->hasReplyPreview())
|
||||
? firstMedia->replyPreview()
|
||||
: nullptr;
|
||||
|
@ -6825,7 +6820,6 @@ void HistoryWidget::drawPinnedBar(Painter &p) {
|
|||
Expects(_pinnedBar != nullptr);
|
||||
|
||||
auto top = _topBar->bottomNoMargins();
|
||||
bool serviceColor = false, hasForward = readyToForward();
|
||||
p.fillRect(myrtlrect(0, top, width(), st::historyReplyHeight), st::historyPinnedBg);
|
||||
|
||||
top += st::msgReplyPadding.top();
|
||||
|
|
|
@ -634,9 +634,6 @@ base::unique_qptr<Ui::PopupMenu> FillContextMenu(
|
|||
const auto document = linkDocument
|
||||
? linkDocument->document().get()
|
||||
: nullptr;
|
||||
const auto isVideoLink = document ? document->isVideoFile() : false;
|
||||
const auto isVoiceLink = document ? document->isVoiceMessage() : false;
|
||||
const auto isAudioLink = document ? document->isAudioFile() : false;
|
||||
const auto hasSelection = !request.selectedItems.empty()
|
||||
|| !request.selectedText.empty();
|
||||
|
||||
|
|
|
@ -358,7 +358,7 @@ std::optional<int> ListWidget::scrollTopForPosition(
|
|||
}
|
||||
const auto index = findNearestItem(position);
|
||||
const auto view = _items[index];
|
||||
return scrollTopForView(_items[index]);
|
||||
return scrollTopForView(view);
|
||||
}
|
||||
|
||||
std::optional<int> ListWidget::scrollTopForView(
|
||||
|
@ -1748,11 +1748,9 @@ void ListWidget::updateDragSelection() {
|
|||
}
|
||||
const auto fromView = selectingUp ? overView : pressView;
|
||||
const auto tillView = selectingUp ? pressView : overView;
|
||||
updateDragSelection(
|
||||
selectingUp ? overView : pressView,
|
||||
selectingUp ? _overState : _pressState,
|
||||
selectingUp ? pressView : overView,
|
||||
selectingUp ? _pressState : _overState);
|
||||
const auto fromState = selectingUp ? _overState : _pressState;
|
||||
const auto tillState = selectingUp ? _pressState : _overState;
|
||||
updateDragSelection(fromView, fromState, tillView, tillState);
|
||||
}
|
||||
|
||||
void ListWidget::updateDragSelection(
|
||||
|
|
|
@ -104,42 +104,6 @@ RecentEmojiPack &GetRecentEmoji() {
|
|||
}
|
||||
}
|
||||
}
|
||||
const auto defaultRecent = {
|
||||
0xD83DDE02LLU,
|
||||
0xD83DDE18LLU,
|
||||
0x2764LLU,
|
||||
0xD83DDE0DLLU,
|
||||
0xD83DDE0ALLU,
|
||||
0xD83DDE01LLU,
|
||||
0xD83DDC4DLLU,
|
||||
0x263ALLU,
|
||||
0xD83DDE14LLU,
|
||||
0xD83DDE04LLU,
|
||||
0xD83DDE2DLLU,
|
||||
0xD83DDC8BLLU,
|
||||
0xD83DDE12LLU,
|
||||
0xD83DDE33LLU,
|
||||
0xD83DDE1CLLU,
|
||||
0xD83DDE48LLU,
|
||||
0xD83DDE09LLU,
|
||||
0xD83DDE03LLU,
|
||||
0xD83DDE22LLU,
|
||||
0xD83DDE1DLLU,
|
||||
0xD83DDE31LLU,
|
||||
0xD83DDE21LLU,
|
||||
0xD83DDE0FLLU,
|
||||
0xD83DDE1ELLU,
|
||||
0xD83DDE05LLU,
|
||||
0xD83DDE1ALLU,
|
||||
0xD83DDE4ALLU,
|
||||
0xD83DDE0CLLU,
|
||||
0xD83DDE00LLU,
|
||||
0xD83DDE0BLLU,
|
||||
0xD83DDE06LLU,
|
||||
0xD83DDC4CLLU,
|
||||
0xD83DDE10LLU,
|
||||
0xD83DDE15LLU,
|
||||
};
|
||||
for (const auto emoji : Ui::Emoji::GetDefaultRecent()) {
|
||||
if (result.size() >= kRecentEmojiLimit) break;
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
namespace Settings {
|
||||
namespace {
|
||||
|
||||
constexpr auto kRefreshSuggestedTimeout = 7200 * crl::time(1000);
|
||||
constexpr auto kFiltersLimit = 10;
|
||||
|
||||
using Flag = Data::ChatFilter::Flag;
|
||||
|
|
|
@ -349,7 +349,7 @@ void DownloadManagerMtproto::removeSession(MTP::DcId dcId) {
|
|||
|
||||
// Make sure we don't send anything to that session while redirecting.
|
||||
session.requested += kMaxWaitedInSession * kMaxSessionsCount;
|
||||
_queues[dcId].removeSession(index);
|
||||
queue.removeSession(index);
|
||||
Assert(session.requested == kMaxWaitedInSession * kMaxSessionsCount);
|
||||
|
||||
dc.sessions.pop_back();
|
||||
|
|
|
@ -106,13 +106,13 @@ bool CheckStreamStatus(QDataStream &stream) {
|
|||
[[nodiscard]] const MTP::Config &LookupFallbackConfig() {
|
||||
static const auto lookupConfig = [](not_null<Main::Account*> account) {
|
||||
const auto mtp = &account->mtp();
|
||||
return (mtp->environment() == MTP::Environment::Production)
|
||||
const auto production = MTP::Environment::Production;
|
||||
return (mtp->environment() == production)
|
||||
? &mtp->config()
|
||||
: nullptr;
|
||||
};
|
||||
const auto &app = Core::App();
|
||||
const auto &domain = app.domain();
|
||||
const auto production = MTP::Environment::Production;
|
||||
if (!domain.started()) {
|
||||
return app.fallbackProductionConfig();
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ namespace Ui {
|
|||
namespace {
|
||||
|
||||
constexpr auto kHideTimeoutMs = crl::time(300);
|
||||
constexpr auto kDelayedHideTimeoutMs = 3 * crl::time(1000);
|
||||
constexpr auto kIconsPerRow = 6;
|
||||
|
||||
constexpr auto kIcons = std::array{
|
||||
|
|
|
@ -627,7 +627,6 @@ void Generator::paintRow(const Row &row) {
|
|||
auto availableWidth = namewidth;
|
||||
if (row.unreadCounter) {
|
||||
auto counter = QString::number(row.unreadCounter);
|
||||
auto mutedCounter = row.muted;
|
||||
auto unreadRight = x + fullWidth - st::dialogsPadding.x();
|
||||
auto unreadTop = texttop + st::dialogsTextFont->ascent - st::dialogsUnreadFont->ascent - (st::dialogsUnreadHeight - st::dialogsUnreadFont->height) / 2;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue