mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Don't mark as read when scheduling messages.
This commit is contained in:
parent
79e6369e27
commit
d4feb16378
4 changed files with 26 additions and 13 deletions
|
@ -525,9 +525,13 @@ void SendConfirmedFile(
|
|||
}
|
||||
|
||||
session->data().sendHistoryChangeNotifications();
|
||||
session->changes().historyUpdated(
|
||||
history,
|
||||
Data::HistoryUpdate::Flag::MessageSent);
|
||||
if (!itemToEdit) {
|
||||
session->changes().historyUpdated(
|
||||
history,
|
||||
(action.options.scheduled
|
||||
? Data::HistoryUpdate::Flag::ScheduledSent
|
||||
: Data::HistoryUpdate::Flag::MessageSent));
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Api
|
||||
|
|
|
@ -3903,8 +3903,10 @@ void ApiWrap::userPhotosDone(
|
|||
//}
|
||||
|
||||
void ApiWrap::sendAction(const SendAction &action) {
|
||||
_session->data().histories().readInbox(action.history);
|
||||
action.history->getReadyFor(ShowAtTheEndMsgId);
|
||||
if (!action.options.scheduled) {
|
||||
_session->data().histories().readInbox(action.history);
|
||||
action.history->getReadyFor(ShowAtTheEndMsgId);
|
||||
}
|
||||
_sendActions.fire_copy(action);
|
||||
}
|
||||
|
||||
|
@ -3924,7 +3926,9 @@ void ApiWrap::finishForwarding(const SendAction &action) {
|
|||
_session->data().sendHistoryChangeNotifications();
|
||||
_session->changes().historyUpdated(
|
||||
history,
|
||||
Data::HistoryUpdate::Flag::MessageSent);
|
||||
(action.options.scheduled
|
||||
? Data::HistoryUpdate::Flag::ScheduledSent
|
||||
: Data::HistoryUpdate::Flag::MessageSent));
|
||||
}
|
||||
|
||||
void ApiWrap::forwardMessages(
|
||||
|
@ -4164,7 +4168,9 @@ void ApiWrap::sendSharedContact(
|
|||
_session->data().sendHistoryChangeNotifications();
|
||||
_session->changes().historyUpdated(
|
||||
history,
|
||||
Data::HistoryUpdate::Flag::MessageSent);
|
||||
(action.options.scheduled
|
||||
? Data::HistoryUpdate::Flag::ScheduledSent
|
||||
: Data::HistoryUpdate::Flag::MessageSent));
|
||||
}
|
||||
|
||||
void ApiWrap::sendVoiceMessage(
|
||||
|
|
|
@ -109,12 +109,13 @@ struct HistoryUpdate {
|
|||
LocalMessages = (1 << 5),
|
||||
ChatOccupied = (1 << 6),
|
||||
MessageSent = (1 << 7),
|
||||
ForwardDraft = (1 << 8),
|
||||
OutboxRead = (1 << 9),
|
||||
BotKeyboard = (1 << 10),
|
||||
CloudDraft = (1 << 11),
|
||||
ScheduledSent = (1 << 8),
|
||||
ForwardDraft = (1 << 9),
|
||||
OutboxRead = (1 << 10),
|
||||
BotKeyboard = (1 << 11),
|
||||
CloudDraft = (1 << 12),
|
||||
|
||||
LastUsedBit = (1 << 11),
|
||||
LastUsedBit = (1 << 12),
|
||||
};
|
||||
using Flags = base::flags<Flag>;
|
||||
friend inline constexpr auto is_flag_type(Flag) { return true; }
|
||||
|
|
|
@ -3116,7 +3116,9 @@ void HistoryWidget::send(Api::SendOptions options) {
|
|||
}
|
||||
session().changes().historyUpdated(
|
||||
_history,
|
||||
Data::HistoryUpdate::Flag::MessageSent);
|
||||
(options.scheduled
|
||||
? Data::HistoryUpdate::Flag::ScheduledSent
|
||||
: Data::HistoryUpdate::Flag::MessageSent));
|
||||
}
|
||||
|
||||
void HistoryWidget::sendWithModifiers(Qt::KeyboardModifiers modifiers) {
|
||||
|
|
Loading…
Add table
Reference in a new issue