Skip to content

Commit

Permalink
Version 5.10.4: Fix build with GCC.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Jan 22, 2025
1 parent aea90f4 commit 88e80b4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ ClickHandlerPtr PremiumGift::createViewLink() {
return link;
}
const auto from = _gift->from();
const auto itemId = _parent->data()->fullId();
const auto peer = _parent->history()->peer;
const auto date = _parent->data()->date();
const auto data = *_gift->gift();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,6 @@ auto GenerateUniqueGiftMedia(
st::chatUniqueTextPadding,
gift->backdrop.textColor));

const auto itemId = parent->data()->fullId();
auto link = OpenStarGiftLink(parent->data());
push(std::make_unique<ButtonPart>(
tr::lng_sticker_premium_view(tr::now),
Expand Down
6 changes: 5 additions & 1 deletion Telegram/SourceFiles/media/audio/media_audio_local_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ constexpr auto kFrameSize = 4096;
[[nodiscard]] QByteArray ConvertAndCut(const QByteArray &bytes) {
using namespace FFmpeg;

if (bytes.isEmpty()) {
return {};
}

auto wrap = ReadBytesWrap{
.size = bytes.size(),
.data = reinterpret_cast<const uchar*>(bytes.constData()),
Expand Down Expand Up @@ -322,7 +326,7 @@ LocalSound LocalCache::sound(
if (!result.isEmpty()) {
return { id, result };
}
result = resolveOriginalBytes();
result = ConvertAndCut(resolveOriginalBytes());
return !result.isEmpty()
? LocalSound{ id, result }
: fallbackOriginalBytes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@ void Manager::Private::showNotification(
NotificationInfo &&info,
Ui::PeerUserpicView &userpicView) {
const auto peer = info.peer;
const auto options = info.options;
const auto key = ContextId{
.sessionId = peer->session().uniqueId(),
.peerId = peer->id,
Expand All @@ -797,7 +798,7 @@ void Manager::Private::showNotification(

auto i = _notifications.find(key);
if (i != end(_notifications)) {
auto j = i->second.find(msgId);
auto j = i->second.find(info.itemId);
if (j != end(i->second)) {
auto oldNotification = std::move(j->second);
i->second.erase(j);
Expand All @@ -811,7 +812,7 @@ void Manager::Private::showNotification(
base::flat_map<MsgId, Notification>()).first;
}
const auto j = i->second.emplace(
msgId,
info.itemId,
std::move(notification)).first;
j->second->show();
}
Expand Down
2 changes: 1 addition & 1 deletion Telegram/lib_ui

0 comments on commit 88e80b4

Please sign in to comment.