#pragma once #include
#include "history/history.h" namespace AyuForward { bool isForwarding(const PeerId &id); QString stateName(const PeerId &id); class ForwardState { public: enum class State { Preparing, Downloading, Sending, Finished }; void updateBottomBar(not_null session, const PeerData *peer, const State &st); int totalChunks; int currentChunk; int totalMessages; int sentMessages; State state = State::Preparing; bool stopRequested = false; }; bool isAyuForwardNeeded(const std::vector> &items); bool isAyuForwardNeeded(not_null item); bool isFullAyuForwardNeeded(not_null peer, not_null history); void intelligentForward(const PeerData* peer, const std::vector> &item, not_null session, not_null history, const Api::SendAction &action); void forwardMessages(const PeerData* peer, std::vector> item, not_null session, not_null history, const Api::SendAction &action, bool forwardState); }