From 3f639d5689820f2f37a41eeb3bdce96d54e979f2 Mon Sep 17 00:00:00 2001 From: AlexeyZavar Date: Wed, 13 Mar 2024 00:23:58 +0300 Subject: [PATCH] fix: remove rate call box chore: revisit constants --- .../SourceFiles/ayu/ui/sections/edited/edited_log_inner.cpp | 2 +- Telegram/SourceFiles/boxes/peers/edit_peer_requests_box.cpp | 2 +- Telegram/SourceFiles/calls/calls_call.cpp | 2 +- Telegram/SourceFiles/calls/calls_emoji_fingerprint.cpp | 2 +- Telegram/SourceFiles/chat_helpers/bot_keyboard.cpp | 2 +- Telegram/SourceFiles/chat_helpers/emoji_list_widget.cpp | 2 +- Telegram/SourceFiles/chat_helpers/message_field.cpp | 2 +- Telegram/SourceFiles/core/shortcuts.cpp | 2 +- Telegram/SourceFiles/data/data_audio_msg_id.cpp | 2 +- Telegram/SourceFiles/data/data_auto_download.cpp | 2 +- Telegram/SourceFiles/data/data_document_media.cpp | 2 +- Telegram/SourceFiles/data/data_message_reactions.cpp | 2 +- Telegram/SourceFiles/data/data_search_controller.cpp | 2 +- Telegram/SourceFiles/data/stickers/data_stickers.cpp | 2 +- Telegram/SourceFiles/dialogs/ui/dialogs_message_view.cpp | 2 +- Telegram/SourceFiles/export/export_api_wrap.cpp | 4 ++-- .../SourceFiles/history/admin_log/history_admin_log_inner.cpp | 2 +- Telegram/SourceFiles/history/history_inner_widget.cpp | 4 ++-- .../history/view/controls/history_view_compose_controls.cpp | 2 +- .../history/view/history_view_emoji_interactions.cpp | 4 ++-- .../SourceFiles/history/view/history_view_list_widget.cpp | 2 +- Telegram/SourceFiles/history/view/history_view_message.cpp | 2 +- .../SourceFiles/history/view/history_view_sticker_toast.cpp | 2 +- Telegram/SourceFiles/info/media/info_media_list_widget.cpp | 2 +- Telegram/SourceFiles/info/profile/info_profile_members.cpp | 2 +- Telegram/SourceFiles/inline_bots/inline_results_inner.cpp | 2 +- Telegram/SourceFiles/inline_bots/inline_results_widget.cpp | 2 +- Telegram/SourceFiles/media/player/media_player_dropdown.cpp | 2 +- Telegram/SourceFiles/media/player/media_player_panel.cpp | 2 +- .../SourceFiles/media/streaming/media_streaming_document.cpp | 2 +- Telegram/SourceFiles/menu/menu_ttl_validator.cpp | 2 +- Telegram/SourceFiles/settings/settings_information.cpp | 2 +- Telegram/SourceFiles/storage/localimageloader.cpp | 4 ++-- Telegram/SourceFiles/ui/boxes/calendar_box.cpp | 4 ++-- Telegram/SourceFiles/ui/controls/call_mute_button.cpp | 2 +- Telegram/SourceFiles/ui/controls/silent_toggle.cpp | 2 +- Telegram/SourceFiles/ui/unread_badge.cpp | 2 +- Telegram/SourceFiles/window/window_main_menu.cpp | 4 ++-- 38 files changed, 44 insertions(+), 44 deletions(-) diff --git a/Telegram/SourceFiles/ayu/ui/sections/edited/edited_log_inner.cpp b/Telegram/SourceFiles/ayu/ui/sections/edited/edited_log_inner.cpp index 124875fb6..96036d505 100644 --- a/Telegram/SourceFiles/ayu/ui/sections/edited/edited_log_inner.cpp +++ b/Telegram/SourceFiles/ayu/ui/sections/edited/edited_log_inner.cpp @@ -1528,7 +1528,7 @@ void InnerWidget::updateSelected() { if (dragState.link || dragState.cursor == CursorState::Date || dragState.cursor == CursorState::Forwarded) { - Ui::Tooltip::Show(1000, this); + Ui::Tooltip::Show(350, this); } auto cursor = style::cur_default; diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_requests_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_requests_box.cpp index 406c8a978..4b3162007 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_requests_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_requests_box.cpp @@ -34,7 +34,7 @@ namespace { constexpr auto kFirstPageCount = 16; constexpr auto kPerPage = 200; -constexpr auto kServerSearchDelay = crl::time(1000); +constexpr auto kServerSearchDelay = crl::time(150); constexpr auto kAcceptButton = 1; constexpr auto kRejectButton = 2; diff --git a/Telegram/SourceFiles/calls/calls_call.cpp b/Telegram/SourceFiles/calls/calls_call.cpp index ba59556d9..9eb200a27 100644 --- a/Telegram/SourceFiles/calls/calls_call.cpp +++ b/Telegram/SourceFiles/calls/calls_call.cpp @@ -697,7 +697,7 @@ bool Call::handleUpdate(const MTPPhoneCall &call) { )).send(); } } - if (data.is_need_rating() && _id && _accessHash) { + if (false && data.is_need_rating() && _id && _accessHash) { // AyuGram: rate call box removed const auto session = &_user->session(); const auto callId = _id; const auto callAccessHash = _accessHash; diff --git a/Telegram/SourceFiles/calls/calls_emoji_fingerprint.cpp b/Telegram/SourceFiles/calls/calls_emoji_fingerprint.cpp index a39ae87ed..3f41ce710 100644 --- a/Telegram/SourceFiles/calls/calls_emoji_fingerprint.cpp +++ b/Telegram/SourceFiles/calls/calls_emoji_fingerprint.cpp @@ -20,7 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace Calls { namespace { -constexpr auto kTooltipShowTimeoutMs = 1000; +constexpr auto kTooltipShowTimeoutMs = 350; const ushort Data[] = { 0xd83d, 0xde09, 0xd83d, 0xde0d, 0xd83d, 0xde1b, 0xd83d, 0xde2d, 0xd83d, 0xde31, 0xd83d, 0xde21, diff --git a/Telegram/SourceFiles/chat_helpers/bot_keyboard.cpp b/Telegram/SourceFiles/chat_helpers/bot_keyboard.cpp index 5344d1184..ced9e1c87 100644 --- a/Telegram/SourceFiles/chat_helpers/bot_keyboard.cpp +++ b/Telegram/SourceFiles/chat_helpers/bot_keyboard.cpp @@ -369,7 +369,7 @@ QString BotKeyboard::tooltipText() const { } void BotKeyboard::updateSelected() { - Ui::Tooltip::Show(1000, this); + Ui::Tooltip::Show(350, this); if (!_impl) return; diff --git a/Telegram/SourceFiles/chat_helpers/emoji_list_widget.cpp b/Telegram/SourceFiles/chat_helpers/emoji_list_widget.cpp index 3d1b2b13b..caf790d27 100644 --- a/Telegram/SourceFiles/chat_helpers/emoji_list_widget.cpp +++ b/Telegram/SourceFiles/chat_helpers/emoji_list_widget.cpp @@ -2542,7 +2542,7 @@ void EmojiListWidget::setSelected(OverState newSelected) { const auto hasSelection = !v::is_null(_selected); if (hasSelection && Core::App().settings().suggestEmoji()) { - Ui::Tooltip::Show(1000, this); + Ui::Tooltip::Show(350, this); } setCursor(hasSelection ? style::cur_pointer : style::cur_default); diff --git a/Telegram/SourceFiles/chat_helpers/message_field.cpp b/Telegram/SourceFiles/chat_helpers/message_field.cpp index 0cef46221..fdef09548 100644 --- a/Telegram/SourceFiles/chat_helpers/message_field.cpp +++ b/Telegram/SourceFiles/chat_helpers/message_field.cpp @@ -55,7 +55,7 @@ using namespace Ui::Text; using EditLinkAction = Ui::InputField::EditLinkAction; using EditLinkSelection = Ui::InputField::EditLinkSelection; -constexpr auto kParseLinksTimeout = crl::time(1000); +constexpr auto kParseLinksTimeout = crl::time(500); constexpr auto kTypesDuration = 4 * crl::time(1000); // For mention / custom emoji tags save and validate selfId, diff --git a/Telegram/SourceFiles/core/shortcuts.cpp b/Telegram/SourceFiles/core/shortcuts.cpp index a56d18175..1df7336ba 100644 --- a/Telegram/SourceFiles/core/shortcuts.cpp +++ b/Telegram/SourceFiles/core/shortcuts.cpp @@ -25,7 +25,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace Shortcuts { namespace { -constexpr auto kCountLimit = 256; // How many shortcuts can be in json file. +constexpr auto kCountLimit = 2048; // How many shortcuts can be in json file. rpl::event_stream> RequestsStream; diff --git a/Telegram/SourceFiles/data/data_audio_msg_id.cpp b/Telegram/SourceFiles/data/data_audio_msg_id.cpp index d8365bee2..e20d31d69 100644 --- a/Telegram/SourceFiles/data/data_audio_msg_id.cpp +++ b/Telegram/SourceFiles/data/data_audio_msg_id.cpp @@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace { -constexpr auto kMinLengthForChangeablePlaybackSpeed = 20 * TimeId(60); // 20 minutes. +constexpr auto kMinLengthForChangeablePlaybackSpeed = 1 * TimeId(60); // 1 minute. } // namespace diff --git a/Telegram/SourceFiles/data/data_auto_download.cpp b/Telegram/SourceFiles/data/data_auto_download.cpp index c0ea85055..7a35b1599 100644 --- a/Telegram/SourceFiles/data/data_auto_download.cpp +++ b/Telegram/SourceFiles/data/data_auto_download.cpp @@ -17,7 +17,7 @@ namespace Data { namespace AutoDownload { namespace { -constexpr auto kDefaultMaxSize = 8 * int64(1024 * 1024); +constexpr auto kDefaultMaxSize = 12 * int64(1024 * 1024); constexpr auto kDefaultAutoPlaySize = 50 * int64(1024 * 1024); constexpr auto kVersion1 = char(1); constexpr auto kVersion = char(2); diff --git a/Telegram/SourceFiles/data/data_document_media.cpp b/Telegram/SourceFiles/data/data_document_media.cpp index 101f0f8cc..a7783605c 100644 --- a/Telegram/SourceFiles/data/data_document_media.cpp +++ b/Telegram/SourceFiles/data/data_document_media.cpp @@ -33,7 +33,7 @@ namespace { constexpr auto kReadAreaLimit = 12'032 * 9'024; constexpr auto kWallPaperThumbnailLimit = 960; -constexpr auto kGoodThumbQuality = 87; +constexpr auto kGoodThumbQuality = 95; enum class FileType { Video, diff --git a/Telegram/SourceFiles/data/data_message_reactions.cpp b/Telegram/SourceFiles/data/data_message_reactions.cpp index 0391ac24b..71959f3ed 100644 --- a/Telegram/SourceFiles/data/data_message_reactions.cpp +++ b/Telegram/SourceFiles/data/data_message_reactions.cpp @@ -40,7 +40,7 @@ namespace Data { namespace { constexpr auto kRefreshFullListEach = 60 * 60 * crl::time(1000); -constexpr auto kPollEach = 20 * crl::time(1000); +constexpr auto kPollEach = 10 * crl::time(1000); constexpr auto kSizeForDownscale = 64; constexpr auto kRecentRequestTimeout = 10 * crl::time(1000); constexpr auto kRecentReactionsLimit = 40; diff --git a/Telegram/SourceFiles/data/data_search_controller.cpp b/Telegram/SourceFiles/data/data_search_controller.cpp index 43c5efb66..38c51f9a6 100644 --- a/Telegram/SourceFiles/data/data_search_controller.cpp +++ b/Telegram/SourceFiles/data/data_search_controller.cpp @@ -21,7 +21,7 @@ namespace { constexpr auto kSharedMediaLimit = 100; constexpr auto kFirstSharedMediaLimit = 0; -constexpr auto kDefaultSearchTimeoutMs = crl::time(200); +constexpr auto kDefaultSearchTimeoutMs = crl::time(70); } // namespace diff --git a/Telegram/SourceFiles/data/stickers/data_stickers.cpp b/Telegram/SourceFiles/data/stickers/data_stickers.cpp index c18a1c3bf..3deebf44c 100644 --- a/Telegram/SourceFiles/data/stickers/data_stickers.cpp +++ b/Telegram/SourceFiles/data/stickers/data_stickers.cpp @@ -41,7 +41,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace Data { namespace { -constexpr auto kPremiumToastDuration = 5 * crl::time(1000); +constexpr auto kPremiumToastDuration = 3 * crl::time(1000); using SetFlag = StickersSetFlag; diff --git a/Telegram/SourceFiles/dialogs/ui/dialogs_message_view.cpp b/Telegram/SourceFiles/dialogs/ui/dialogs_message_view.cpp index 1202d5aaf..d19e4854a 100644 --- a/Telegram/SourceFiles/dialogs/ui/dialogs_message_view.cpp +++ b/Telegram/SourceFiles/dialogs/ui/dialogs_message_view.cpp @@ -26,7 +26,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace { -constexpr auto kEmojiLoopCount = 2; +constexpr auto kEmojiLoopCount = 12; template struct TextWithTagOffset { diff --git a/Telegram/SourceFiles/export/export_api_wrap.cpp b/Telegram/SourceFiles/export/export_api_wrap.cpp index b50c105f3..6471feb82 100644 --- a/Telegram/SourceFiles/export/export_api_wrap.cpp +++ b/Telegram/SourceFiles/export/export_api_wrap.cpp @@ -22,8 +22,8 @@ namespace Export { namespace { constexpr auto kUserpicsSliceLimit = 100; -constexpr auto kFileChunkSize = 128 * 1024; -constexpr auto kFileRequestsCount = 2; +constexpr auto kFileChunkSize = 8 * 128 * 1024; +constexpr auto kFileRequestsCount = 3; //constexpr auto kFileNextRequestDelay = crl::time(20); constexpr auto kChatsSliceLimit = 100; constexpr auto kMessagesSliceLimit = 100; diff --git a/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp b/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp index b7bb4b9e0..21030589a 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp @@ -1775,7 +1775,7 @@ void InnerWidget::updateSelected() { if (dragState.link || dragState.cursor == CursorState::Date || dragState.cursor == CursorState::Forwarded) { - Ui::Tooltip::Show(1000, this); + Ui::Tooltip::Show(350, this); } auto cursor = style::cur_default; diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index ca841583b..eedcab893 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -95,7 +95,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace { -constexpr auto kScrollDateHideTimeout = 1000; +constexpr auto kScrollDateHideTimeout = 800; constexpr auto kUnloadHeavyPartsPages = 2; constexpr auto kClearUserpicsAfter = 50; @@ -3729,7 +3729,7 @@ void HistoryInner::mouseActionUpdate() { || dragState.cursor == CursorState::Date || dragState.cursor == CursorState::Forwarded || dragState.customTooltip) { - Ui::Tooltip::Show(1000, this); + Ui::Tooltip::Show(350, this); } Qt::CursorShape cur = style::cur_default; diff --git a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp index c8d47451c..505950697 100644 --- a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp +++ b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp @@ -90,7 +90,7 @@ namespace { constexpr auto kSaveDraftTimeout = crl::time(1000); constexpr auto kSaveDraftAnywayTimeout = 5 * crl::time(1000); -constexpr auto kSaveCloudDraftIdleTimeout = 14 * crl::time(1000); +constexpr auto kSaveCloudDraftIdleTimeout = 12 * crl::time(1000); constexpr auto kMouseEvents = { QEvent::MouseMove, QEvent::MouseButtonPress, diff --git a/Telegram/SourceFiles/history/view/history_view_emoji_interactions.cpp b/Telegram/SourceFiles/history/view/history_view_emoji_interactions.cpp index 91e18f9d8..c274af095 100644 --- a/Telegram/SourceFiles/history/view/history_view_emoji_interactions.cpp +++ b/Telegram/SourceFiles/history/view/history_view_emoji_interactions.cpp @@ -26,8 +26,8 @@ namespace HistoryView { namespace { constexpr auto kPremiumShift = 21. / 240; -constexpr auto kMaxPlays = 5; -constexpr auto kMaxPlaysWithSmallDelay = 3; +constexpr auto kMaxPlays = 8; +constexpr auto kMaxPlaysWithSmallDelay = 5; constexpr auto kSmallDelay = crl::time(200); constexpr auto kDropDelayedAfterDelay = crl::time(2000); diff --git a/Telegram/SourceFiles/history/view/history_view_list_widget.cpp b/Telegram/SourceFiles/history/view/history_view_list_widget.cpp index 393284d32..1f2d4b022 100644 --- a/Telegram/SourceFiles/history/view/history_view_list_widget.cpp +++ b/Telegram/SourceFiles/history/view/history_view_list_widget.cpp @@ -3491,7 +3491,7 @@ void ListWidget::mouseActionUpdate() { if (dragState.link || dragState.cursor == CursorState::Date || dragState.cursor == CursorState::Forwarded) { - Ui::Tooltip::Show(1000, this); + Ui::Tooltip::Show(350, this); } if (_mouseAction == MouseAction::None) { diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index 1b1c80626..3001349a8 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -52,7 +52,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace HistoryView { namespace { -constexpr auto kPlayStatusLimit = 2; +constexpr auto kPlayStatusLimit = 12; const auto kPsaTooltipPrefix = "cloud_lng_tooltip_psa_"; [[nodiscard]] Window::SessionController *ExtractController( diff --git a/Telegram/SourceFiles/history/view/history_view_sticker_toast.cpp b/Telegram/SourceFiles/history/view/history_view_sticker_toast.cpp index f10d8e328..c07606906 100644 --- a/Telegram/SourceFiles/history/view/history_view_sticker_toast.cpp +++ b/Telegram/SourceFiles/history/view/history_view_sticker_toast.cpp @@ -28,7 +28,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace HistoryView { namespace { -constexpr auto kPremiumToastDuration = 5 * crl::time(1000); +constexpr auto kPremiumToastDuration = 3 * crl::time(1000); } // namespace diff --git a/Telegram/SourceFiles/info/media/info_media_list_widget.cpp b/Telegram/SourceFiles/info/media/info_media_list_widget.cpp index 1a42e6379..7cc90d0c6 100644 --- a/Telegram/SourceFiles/info/media/info_media_list_widget.cpp +++ b/Telegram/SourceFiles/info/media/info_media_list_widget.cpp @@ -1563,7 +1563,7 @@ void ListWidget::mouseActionUpdate(const QPoint &globalPosition) { Ui::Tooltip::Hide(); } if (dragState.link) { - Ui::Tooltip::Show(1000, this); + Ui::Tooltip::Show(350, this); } if (_mouseAction == MouseAction::None) { diff --git a/Telegram/SourceFiles/info/profile/info_profile_members.cpp b/Telegram/SourceFiles/info/profile/info_profile_members.cpp index 0574dd6da..0f201de84 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_members.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_members.cpp @@ -38,7 +38,7 @@ namespace Info { namespace Profile { namespace { -constexpr auto kEnableSearchMembersAfterCount = 20; +constexpr auto kEnableSearchMembersAfterCount = 8; } // namespace diff --git a/Telegram/SourceFiles/inline_bots/inline_results_inner.cpp b/Telegram/SourceFiles/inline_bots/inline_results_inner.cpp index 0103789ec..7cc89da4a 100644 --- a/Telegram/SourceFiles/inline_bots/inline_results_inner.cpp +++ b/Telegram/SourceFiles/inline_bots/inline_results_inner.cpp @@ -629,7 +629,7 @@ void Inner::updateSelected() { Ui::Tooltip::Hide(); } if (link) { - Ui::Tooltip::Show(1000, this); + Ui::Tooltip::Show(350, this); } } diff --git a/Telegram/SourceFiles/inline_bots/inline_results_widget.cpp b/Telegram/SourceFiles/inline_bots/inline_results_widget.cpp index 3808ed989..2df459478 100644 --- a/Telegram/SourceFiles/inline_bots/inline_results_widget.cpp +++ b/Telegram/SourceFiles/inline_bots/inline_results_widget.cpp @@ -23,7 +23,7 @@ namespace InlineBots { namespace Layout { namespace { -constexpr auto kInlineBotRequestDelay = 400; +constexpr auto kInlineBotRequestDelay = 350; } // namespace diff --git a/Telegram/SourceFiles/media/player/media_player_dropdown.cpp b/Telegram/SourceFiles/media/player/media_player_dropdown.cpp index c00765cf8..618a0becb 100644 --- a/Telegram/SourceFiles/media/player/media_player_dropdown.cpp +++ b/Telegram/SourceFiles/media/player/media_player_dropdown.cpp @@ -24,7 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace Media::Player { namespace { -constexpr auto kSpeedDebounceTimeout = crl::time(1000); +constexpr auto kSpeedDebounceTimeout = crl::time(600); [[nodiscard]] float64 SpeedToSliderValue(float64 speed) { return (speed - kSpeedMin) / (kSpeedMax - kSpeedMin); diff --git a/Telegram/SourceFiles/media/player/media_player_panel.cpp b/Telegram/SourceFiles/media/player/media_player_panel.cpp index e592010f5..28c145b4b 100644 --- a/Telegram/SourceFiles/media/player/media_player_panel.cpp +++ b/Telegram/SourceFiles/media/player/media_player_panel.cpp @@ -31,7 +31,7 @@ namespace { using ListWidget = Info::Media::ListWidget; constexpr auto kPlaylistIdsLimit = 32; -constexpr auto kDelayedHideTimeout = crl::time(3000); +constexpr auto kDelayedHideTimeout = crl::time(1800); } // namespace diff --git a/Telegram/SourceFiles/media/streaming/media_streaming_document.cpp b/Telegram/SourceFiles/media/streaming/media_streaming_document.cpp index 27c090443..3ecad745b 100644 --- a/Telegram/SourceFiles/media/streaming/media_streaming_document.cpp +++ b/Telegram/SourceFiles/media/streaming/media_streaming_document.cpp @@ -28,7 +28,7 @@ namespace { constexpr auto kWaitingFastDuration = crl::time(200); constexpr auto kWaitingShowDuration = crl::time(500); constexpr auto kWaitingShowDelay = crl::time(500); -constexpr auto kGoodThumbQuality = 87; +constexpr auto kGoodThumbQuality = 100; } // namespace diff --git a/Telegram/SourceFiles/menu/menu_ttl_validator.cpp b/Telegram/SourceFiles/menu/menu_ttl_validator.cpp index a5ecac427..e1640fddf 100644 --- a/Telegram/SourceFiles/menu/menu_ttl_validator.cpp +++ b/Telegram/SourceFiles/menu/menu_ttl_validator.cpp @@ -26,7 +26,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace TTLMenu { namespace { -constexpr auto kToastDuration = crl::time(3500); +constexpr auto kToastDuration = crl::time(3000); void ShowAutoDeleteToast( std::shared_ptr show, diff --git a/Telegram/SourceFiles/settings/settings_information.cpp b/Telegram/SourceFiles/settings/settings_information.cpp index 3fdb95d0e..1f0a3f883 100644 --- a/Telegram/SourceFiles/settings/settings_information.cpp +++ b/Telegram/SourceFiles/settings/settings_information.cpp @@ -66,7 +66,7 @@ namespace Settings { namespace { constexpr auto kSaveBioTimeout = 1000; -constexpr auto kPlayStatusLimit = 2; +constexpr auto kPlayStatusLimit = 12; class ComposedBadge final : public Ui::RpWidget { public: diff --git a/Telegram/SourceFiles/storage/localimageloader.cpp b/Telegram/SourceFiles/storage/localimageloader.cpp index f3807c214..300b832b0 100644 --- a/Telegram/SourceFiles/storage/localimageloader.cpp +++ b/Telegram/SourceFiles/storage/localimageloader.cpp @@ -44,7 +44,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace { -constexpr auto kThumbnailQuality = 87; +constexpr auto kThumbnailQuality = 95; constexpr auto kThumbnailSize = 320; constexpr auto kPhotoUploadPartSize = 32 * 1024; constexpr auto kRecompressAfterBpp = 4; @@ -199,7 +199,7 @@ struct PreparedFileThumbnail { auto result = QByteArray(); QBuffer buffer(&result); QImageWriter writer(&buffer, "JPEG"); - writer.setQuality(87); + writer.setQuality(95); writer.setProgressiveScanWrite(true); writer.write(full); buffer.close(); diff --git a/Telegram/SourceFiles/ui/boxes/calendar_box.cpp b/Telegram/SourceFiles/ui/boxes/calendar_box.cpp index 5c46fbff4..6a1ca54cb 100644 --- a/Telegram/SourceFiles/ui/boxes/calendar_box.cpp +++ b/Telegram/SourceFiles/ui/boxes/calendar_box.cpp @@ -22,8 +22,8 @@ namespace Ui { namespace { constexpr auto kDaysInWeek = 7; -constexpr auto kTooltipDelay = crl::time(1000); -constexpr auto kJumpDelay = 2 * crl::time(1000); +constexpr auto kTooltipDelay = crl::time(350); +constexpr auto kJumpDelay = 2 * crl::time(350); } // namespace diff --git a/Telegram/SourceFiles/ui/controls/call_mute_button.cpp b/Telegram/SourceFiles/ui/controls/call_mute_button.cpp index dfb31807e..2c57087c0 100644 --- a/Telegram/SourceFiles/ui/controls/call_mute_button.cpp +++ b/Telegram/SourceFiles/ui/controls/call_mute_button.cpp @@ -696,7 +696,7 @@ void CallMuteButton::init() { ) | rpl::start_with_next([=](not_null e) { if (e->type() == QEvent::MouseMove) { if (!_state.current().tooltip.isEmpty()) { - Ui::Tooltip::Show(1000, this); + Ui::Tooltip::Show(350, this); } } else if (e->type() == QEvent::Leave) { Ui::Tooltip::Hide(); diff --git a/Telegram/SourceFiles/ui/controls/silent_toggle.cpp b/Telegram/SourceFiles/ui/controls/silent_toggle.cpp index 9c5f88401..25b4ef355 100644 --- a/Telegram/SourceFiles/ui/controls/silent_toggle.cpp +++ b/Telegram/SourceFiles/ui/controls/silent_toggle.cpp @@ -54,7 +54,7 @@ void SilentToggle::paintEvent(QPaintEvent *e) { void SilentToggle::mouseMoveEvent(QMouseEvent *e) { RippleButton::mouseMoveEvent(e); if (rect().contains(e->pos())) { - Ui::Tooltip::Show(1000, this); + Ui::Tooltip::Show(350, this); } else { Ui::Tooltip::Hide(); } diff --git a/Telegram/SourceFiles/ui/unread_badge.cpp b/Telegram/SourceFiles/ui/unread_badge.cpp index 375beb5c6..ef0e3aa30 100644 --- a/Telegram/SourceFiles/ui/unread_badge.cpp +++ b/Telegram/SourceFiles/ui/unread_badge.cpp @@ -21,7 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace Ui { namespace { -constexpr auto kPlayStatusLimit = 2; +constexpr auto kPlayStatusLimit = 12; } // namespace diff --git a/Telegram/SourceFiles/window/window_main_menu.cpp b/Telegram/SourceFiles/window/window_main_menu.cpp index 7f56c8d24..117aeba8b 100644 --- a/Telegram/SourceFiles/window/window_main_menu.cpp +++ b/Telegram/SourceFiles/window/window_main_menu.cpp @@ -86,7 +86,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace Window { namespace { -constexpr auto kPlayStatusLimit = 2; +constexpr auto kPlayStatusLimit = 12; class VersionLabel final : public Ui::FlatLabel @@ -99,7 +99,7 @@ public: bool active) override { update(); if (active && action && !action->dragText().isEmpty()) { - Ui::Tooltip::Show(1000, this); + Ui::Tooltip::Show(350, this); } else { Ui::Tooltip::Hide(); }