mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Fix shortcut messages sizing / emoji panel.
This commit is contained in:
@@ -60,7 +60,8 @@ constexpr auto kRequestTimeLimit = 60 * crl::time(1000);
|
||||
MTP_int(data.vttl_period().value_or_empty()));
|
||||
}, [&](const MTPDmessage &data) {
|
||||
return MTP_message(
|
||||
MTP_flags(data.vflags().v | MTPDmessage::Flag::f_quick_reply_shortcut_id),
|
||||
MTP_flags(data.vflags().v
|
||||
| MTPDmessage::Flag::f_quick_reply_shortcut_id),
|
||||
data.vid(),
|
||||
data.vfrom_id() ? *data.vfrom_id() : MTPPeer(),
|
||||
MTPint(), // from_boosts_applied
|
||||
|
@@ -96,6 +96,18 @@ public:
|
||||
[[nodiscard]] static constexpr DraftKey ScheduledEdit() {
|
||||
return kScheduledDraftIndex + kEditDraftShift;
|
||||
}
|
||||
[[nodiscard]] static constexpr DraftKey Shortcut(
|
||||
BusinessShortcutId shortcutId) {
|
||||
return (shortcutId < 0 || shortcutId >= ServerMaxMsgId)
|
||||
? None()
|
||||
: (kShortcutDraftShift + shortcutId);
|
||||
}
|
||||
[[nodiscard]] static constexpr DraftKey ShortcutEdit(
|
||||
BusinessShortcutId shortcutId) {
|
||||
return (shortcutId < 0 || shortcutId >= ServerMaxMsgId)
|
||||
? None()
|
||||
: (kShortcutDraftShift + kEditDraftShift + shortcutId);
|
||||
}
|
||||
|
||||
[[nodiscard]] static constexpr DraftKey FromSerialized(qint64 value) {
|
||||
return value;
|
||||
@@ -156,6 +168,7 @@ private:
|
||||
static constexpr auto kScheduledDraftIndex = -3;
|
||||
static constexpr auto kEditDraftShift = ServerMaxMsgId.bare;
|
||||
static constexpr auto kCloudDraftShift = 2 * ServerMaxMsgId.bare;
|
||||
static constexpr auto kShortcutDraftShift = 3 * ServerMaxMsgId.bare;
|
||||
static constexpr auto kEditDraftShiftOld = 0x3FFF'FFFF;
|
||||
|
||||
int64 _value = 0;
|
||||
|
Reference in New Issue
Block a user