2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Start multiboosts, support dynamic state.

This commit is contained in:
John Preston
2023-11-07 17:58:20 +04:00
parent 2d67557a91
commit a41bbd27c8
11 changed files with 300 additions and 191 deletions

View File

@@ -68,6 +68,7 @@ struct ChatPaintContext;
struct ChatThemeBackground;
struct ChatThemeBackgroundData;
class MessageSendingAnimationController;
struct BoostCounters;
} // namespace Ui
namespace Data {
@@ -314,16 +315,18 @@ private:
const PeerByLinkInfo &info);
void resolveBoostState(not_null<ChannelData*> channel);
void applyBoost(not_null<ChannelData*> channel, Fn<void(bool)> done);
void applyBoost(
not_null<ChannelData*> channel,
Fn<void(Ui::BoostCounters)> done);
void replaceBoostConfirm(
not_null<PeerData*> from,
not_null<ChannelData*> channel,
int slot,
Fn<void(bool)> done);
Fn<void(Ui::BoostCounters)> done);
void applyBoostChecked(
not_null<ChannelData*> channel,
int slot,
Fn<void(bool)> done);
Fn<void(Ui::BoostCounters)> done);
const not_null<Main::Session*> _session;
@@ -752,4 +755,7 @@ void ActivateWindow(not_null<SessionController*> controller);
not_null<SessionController*> controller,
GifPauseReason level);
[[nodiscard]] Ui::BoostCounters ParseBoostCounters(
const MTPpremium_BoostsStatus &status);
} // namespace Window