ZaStoGram_desktop/Telegram/SourceFiles/info/profile/info_profile_qr_gifts.h
John Preston 6b3d996c16 Choose collectible gifts as the QR box appearance.
Task: 2026/10/15/choose-a-unique-gift-for-the-qr-box
2026-10-20 17:07:54 +04:00

50 lines
1.1 KiB
C++

/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#include "ui/effects/peer_qr_colors_panel.h"
#include "ui/effects/peer_qr_gift_field.h"
class PeerData;
namespace Main {
class Session;
} // namespace Main
namespace Window {
class SessionController;
} // namespace Window
namespace Info::Profile {
struct QrGiftsSlice {
std::vector<Ui::PeerQrSwatch> gifts;
bool complete = false;
};
struct QrGiftList {
rpl::producer<QrGiftsSlice> slices;
rpl::producer<bool> browseShown;
Fn<void()> refresh;
Fn<void()> loadMore;
Fn<void()> browse;
Fn<void(
const Ui::PeerQrThemeKey&,
Fn<void()>,
Fn<void(QString)>)> save;
};
[[nodiscard]] QrGiftList CreateQrGiftList(
not_null<PeerData*> peer,
Window::SessionController *controller,
rpl::lifetime &lifetime);
[[nodiscard]] rpl::producer<Ui::PeerQrGiftSource> QrGiftSourceValue(
not_null<Main::Session*> session);
} // namespace Info::Profile