diff --git a/Telegram/SourceFiles/boxes/star_gift_auction_box.cpp b/Telegram/SourceFiles/boxes/star_gift_auction_box.cpp index 36310e2bc2..4f58090ab4 100644 --- a/Telegram/SourceFiles/boxes/star_gift_auction_box.cpp +++ b/Telegram/SourceFiles/boxes/star_gift_auction_box.cpp @@ -59,7 +59,7 @@ namespace { constexpr auto kAuctionAboutShownPref = "gift_auction_about_shown"_cs; constexpr auto kBidPlacedToastDuration = 5 * crl::time(1000); -constexpr auto kMaxShownBid = 30'000'00; AssertIsDebug() +constexpr auto kMaxShownBid = 30'000; enum class BidType { Setting, @@ -489,10 +489,14 @@ void AuctionBidBox(not_null box, AuctionBidBoxArgs &&args) { const auto min = std::max( int(mine ? now.my.minBidAmount : now.minBidAmount), 1); + const auto last = now.bidLevels.empty() + ? 0 + : now.bidLevels.front().amount; const auto max = std::max({ min + 1, kMaxShownBid, - mine, + int(base::SafeRound(mine * 1.2)), + int(base::SafeRound(last * 1.2)), }); const auto chosen = mine ? mine : std::clamp(mine, min, max); state->chosen = chosen; diff --git a/Telegram/SourceFiles/data/data_media_types.cpp b/Telegram/SourceFiles/data/data_media_types.cpp index 615d26d166..fb4087c2e2 100644 --- a/Telegram/SourceFiles/data/data_media_types.cpp +++ b/Telegram/SourceFiles/data/data_media_types.cpp @@ -2693,7 +2693,7 @@ MediaStory::MediaStory( if (!maybeStory && maybeStory.error() == NoStory::Unknown) { stories->resolve(storyId, crl::guard(this, [=] { if (const auto maybeStory = stories->lookup(storyId)) { - if ((*maybeStory)->unsupported()) { + if ((*maybeStory)->unsupported() || (*maybeStory)->call()) { _unsupported = true; } else if (!_mention && _viewMayExist) { parent->setText((*maybeStory)->caption()); @@ -2728,7 +2728,7 @@ bool MediaStory::storyExpired(bool revalidate) { if (revalidate) { const auto stories = &parent()->history()->owner().stories(); if (const auto maybeStory = stories->lookup(_storyId)) { - if ((*maybeStory)->unsupported()) { + if ((*maybeStory)->unsupported() || (*maybeStory)->call()) { _unsupported = true; } _expired = false; @@ -2819,7 +2819,7 @@ std::unique_ptr MediaStory::createView( _expired = false; _viewMayExist = true; const auto story = *maybeStory; - if (story->unsupported()) { + if (story->unsupported() || story->call()) { _unsupported = true; return nullptr; } else if (_mention) { @@ -2834,13 +2834,14 @@ std::unique_ptr MediaStory::createView( realParent, photo, spoiler); - } else { + } else if (const auto document = story->document()) { return std::make_unique( message, realParent, story->document(), spoiler); } + return nullptr; } } diff --git a/Telegram/SourceFiles/media/stories/media_stories_reactions.cpp b/Telegram/SourceFiles/media/stories/media_stories_reactions.cpp index fc695ded80..abe37b56ef 100644 --- a/Telegram/SourceFiles/media/stories/media_stories_reactions.cpp +++ b/Telegram/SourceFiles/media/stories/media_stories_reactions.cpp @@ -884,7 +884,6 @@ void Reactions::Panel::create() { if (reactions.recent.empty() || (_mode.current() == Mode::Message && _controller->videoStream())) { - AssertIsDebug(); return; } _parent = std::make_unique(_controller->wrap().get()); diff --git a/Telegram/SourceFiles/storage/storage_account.cpp b/Telegram/SourceFiles/storage/storage_account.cpp index 71ea94f0a1..ab62a58beb 100644 --- a/Telegram/SourceFiles/storage/storage_account.cpp +++ b/Telegram/SourceFiles/storage/storage_account.cpp @@ -3747,7 +3747,6 @@ void Account::writePrefs() { } void Account::readPrefs() { - return; AssertIsDebug(); FileReadDescriptor prefs; if (!ReadEncryptedFile(prefs, _prefsKey, _basePath, _localKey)) { ClearKey(_prefsKey, _basePath);