mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-13 23:13:32 +00:00
Merge tag 'v6.4.2' into dev
This commit is contained in:
@@ -34,6 +34,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "history/view/history_view_subsection_tabs.h"
|
||||
#include "media/player/media_player_instance.h"
|
||||
#include "media/view/media_view_open_common.h"
|
||||
#include "data/components/gift_auctions.h"
|
||||
#include "data/components/recent_peers.h"
|
||||
#include "data/stickers/data_custom_emoji.h"
|
||||
#include "data/data_document_resolver.h"
|
||||
@@ -3565,6 +3566,11 @@ HistoryView::PaintContext SessionController::preparePaintContext(
|
||||
Ui::ChatPaintContextArgs &&args) {
|
||||
const auto visibleAreaTopLocal = content()->mapFromGlobal(
|
||||
args.visibleAreaPositionGlobal).y();
|
||||
const auto area = QRect(
|
||||
0,
|
||||
args.visibleAreaTop,
|
||||
args.visibleAreaWidth,
|
||||
args.visibleAreaHeight);
|
||||
const auto viewport = QRect(
|
||||
0,
|
||||
args.visibleAreaTop - visibleAreaTopLocal,
|
||||
@@ -3573,6 +3579,7 @@ HistoryView::PaintContext SessionController::preparePaintContext(
|
||||
return args.theme->preparePaintContext(
|
||||
_chatStyle.get(),
|
||||
viewport,
|
||||
area,
|
||||
args.clip,
|
||||
isGifPausedAtLeastFor(GifPauseReason::Any));
|
||||
}
|
||||
@@ -3654,10 +3661,29 @@ void SessionController::dropSubsectionTabs() {
|
||||
|
||||
void SessionController::showStarGiftAuction(const QString &slug) {
|
||||
_starGiftAuctionLifetime.destroy();
|
||||
|
||||
const auto requesting = _starGiftAuctionLifetime.make_state<
|
||||
base::has_weak_ptr
|
||||
>();
|
||||
const auto guard = base::make_weak(requesting);
|
||||
const auto weak = base::make_weak(this);
|
||||
session().giftAuctions().resolveSlug(slug, [=](uint64 giftId) {
|
||||
if (!guard || !weak) {
|
||||
return;
|
||||
}
|
||||
_starGiftAuctionLifetime.destroy();
|
||||
if (giftId) {
|
||||
showStarGiftAuction(giftId);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void SessionController::showStarGiftAuction(uint64 giftId) {
|
||||
_starGiftAuctionLifetime.destroy();
|
||||
_starGiftAuctionLifetime = Ui::ShowStarGiftAuction(
|
||||
this,
|
||||
nullptr,
|
||||
slug,
|
||||
giftId,
|
||||
[] {},
|
||||
[=] { _starGiftAuctionLifetime.destroy(); });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user