mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 22:55:11 +00:00
Add "Send when online" to the send button context menu.
This commit is contained in:
@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#include "api/api_common.h"
|
||||
|
||||
#include "base/qt/qt_key_modifiers.h"
|
||||
#include "data/data_thread.h"
|
||||
|
||||
namespace Api {
|
||||
@@ -20,4 +21,11 @@ SendAction::SendAction(
|
||||
, topicRootId(replyTo) {
|
||||
}
|
||||
|
||||
SendOptions DefaultSendWhenOnlineOptions() {
|
||||
return {
|
||||
.scheduled = kScheduledUntilOnlineTimestamp,
|
||||
.silent = base::IsCtrlPressed(),
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace Api
|
||||
|
@@ -15,6 +15,8 @@ class Thread;
|
||||
|
||||
namespace Api {
|
||||
|
||||
inline constexpr auto kScheduledUntilOnlineTimestamp = TimeId(0x7FFFFFFE);
|
||||
|
||||
struct SendOptions {
|
||||
PeerData *sendAs = nullptr;
|
||||
TimeId scheduled = 0;
|
||||
@@ -23,6 +25,7 @@ struct SendOptions {
|
||||
bool removeWebPageId = false;
|
||||
bool hideViaBot = false;
|
||||
};
|
||||
[[nodiscard]] SendOptions DefaultSendWhenOnlineOptions();
|
||||
|
||||
enum class SendType {
|
||||
Normal,
|
||||
|
Reference in New Issue
Block a user