Version 5.10.4: Fix build with GCC.

This commit is contained in:
John Preston 2025-01-22 23:56:52 +04:00
parent aea90f4b65
commit 88e80b4fae
5 changed files with 9 additions and 6 deletions

View file

@ -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();

View file

@ -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),

View file

@ -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()),
@ -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

View file

@ -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,
@ -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);
@ -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();
}

@ -1 +1 @@
Subproject commit 5fbb38cf872f2132b1ad0a564083c498e6cc6f14
Subproject commit e6e1cb7436262dba90e4764615e998f19d662443