mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 07:07:08 +02:00
fix: remove rate call box
chore: revisit constants
This commit is contained in:
parent
19a5dc8a0c
commit
3f639d5689
38 changed files with 44 additions and 44 deletions
Telegram/SourceFiles
ayu/ui/sections/edited
boxes/peers
calls
chat_helpers
core
data
data_audio_msg_id.cppdata_auto_download.cppdata_document_media.cppdata_message_reactions.cppdata_search_controller.cpp
stickers
dialogs/ui
export
history
info
inline_bots
media
menu
settings
storage
ui
window
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -369,7 +369,7 @@ QString BotKeyboard::tooltipText() const {
|
|||
}
|
||||
|
||||
void BotKeyboard::updateSelected() {
|
||||
Ui::Tooltip::Show(1000, this);
|
||||
Ui::Tooltip::Show(350, this);
|
||||
|
||||
if (!_impl) return;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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<not_null<Request*>> RequestsStream;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
|
||||
namespace {
|
||||
|
||||
constexpr auto kEmojiLoopCount = 2;
|
||||
constexpr auto kEmojiLoopCount = 12;
|
||||
|
||||
template <ushort kTag>
|
||||
struct TextWithTagOffset {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace Info {
|
|||
namespace Profile {
|
||||
namespace {
|
||||
|
||||
constexpr auto kEnableSearchMembersAfterCount = 20;
|
||||
constexpr auto kEnableSearchMembersAfterCount = 8;
|
||||
|
||||
} // namespace
|
||||
|
||||
|
|
|
@ -629,7 +629,7 @@ void Inner::updateSelected() {
|
|||
Ui::Tooltip::Hide();
|
||||
}
|
||||
if (link) {
|
||||
Ui::Tooltip::Show(1000, this);
|
||||
Ui::Tooltip::Show(350, this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace InlineBots {
|
|||
namespace Layout {
|
||||
namespace {
|
||||
|
||||
constexpr auto kInlineBotRequestDelay = 400;
|
||||
constexpr auto kInlineBotRequestDelay = 350;
|
||||
|
||||
} // namespace
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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<Ui::Show> show,
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -696,7 +696,7 @@ void CallMuteButton::init() {
|
|||
) | rpl::start_with_next([=](not_null<QEvent*> 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();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
namespace Ui {
|
||||
namespace {
|
||||
|
||||
constexpr auto kPlayStatusLimit = 2;
|
||||
constexpr auto kPlayStatusLimit = 12;
|
||||
|
||||
} // namespace
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue