mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-06-02 03:53:42 +02:00
Added pass of visible region into credits history list controller.
This commit is contained in:
@@ -121,7 +121,13 @@ private:
|
||||
void setupSwipeBack();
|
||||
void setupHistory(not_null<Ui::VerticalLayout*> container);
|
||||
void setupSubscriptions(not_null<Ui::VerticalLayout*> container);
|
||||
|
||||
void visibleTopBottomUpdated(
|
||||
int visibleTop,
|
||||
int visibleBottom) override;
|
||||
|
||||
const CreditsType _creditsType;
|
||||
Ui::VerticalLayout *_content = nullptr;
|
||||
|
||||
QWidget *_parent = nullptr;
|
||||
|
||||
@@ -482,6 +488,7 @@ void Credits::setupSwipeBack() {
|
||||
|
||||
void Credits::setupContent() {
|
||||
const auto content = Ui::CreateChild<Ui::VerticalLayout>(this);
|
||||
_content = content;
|
||||
const auto isCurrency = _creditsType == CreditsType::Ton;
|
||||
const auto statsButton = &_statsButton;
|
||||
const auto giftButton = &_giftButton;
|
||||
@@ -795,6 +802,10 @@ void Credits::showFinished() {
|
||||
controller()->checkHighlightControl(u"stars/earn"_q, _earnButton);
|
||||
}
|
||||
|
||||
void Credits::visibleTopBottomUpdated(int visibleTop, int visibleBottom) {
|
||||
setChildVisibleTopBottom(_content, visibleTop, visibleBottom);
|
||||
}
|
||||
|
||||
class Currency {
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user