1 /* 2 This file is part of Telegram Desktop, 3 the official desktop application for the Telegram messaging service. 4 5 For license and copyright information please follow this link: 6 https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL 7 */ 8 #pragma once 9 10 namespace Api { 11 enum class SendProgressType; 12 struct SendOptions; 13 } // namespace Api 14 15 class History; 16 17 namespace HistoryView::Controls { 18 19 struct MessageToEdit { 20 FullMsgId fullId; 21 Api::SendOptions options; 22 TextWithTags textWithTags; 23 }; 24 struct VoiceToSend { 25 QByteArray bytes; 26 VoiceWaveform waveform; 27 int duration = 0; 28 Api::SendOptions options; 29 }; 30 struct SendActionUpdate { 31 Api::SendProgressType type = Api::SendProgressType(); 32 int progress = 0; 33 bool cancel = false; 34 }; 35 36 struct SetHistoryArgs { 37 required<History*> history; 38 Fn<bool()> showSlowmodeError; 39 rpl::producer<int> slowmodeSecondsLeft; 40 rpl::producer<bool> sendDisabledBySlowmode; 41 rpl::producer<std::optional<QString>> writeRestriction; 42 }; 43 44 struct ReplyNextRequest { 45 enum class Direction { 46 Next, 47 Previous, 48 }; 49 const FullMsgId replyId; 50 const Direction direction; 51 }; 52 53 } // namespace HistoryView::Controls 54