2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Skip old and currently-sending draft updates.

This commit is contained in:
John Preston
2018-06-08 23:06:26 +03:00
parent 427ceb9a9a
commit cd1c7c56d3
6 changed files with 52 additions and 12 deletions

View File

@@ -304,6 +304,9 @@ public:
void createLocalDraftFromCloud();
void setCloudDraft(std::unique_ptr<Data::Draft> &&draft);
Data::Draft *createCloudDraft(Data::Draft *fromDraft);
bool skipCloudDraft(const QString &text, TimeId date) const;
void setSentDraftText(const QString &text);
void clearSentDraftText();
void setEditDraft(std::unique_ptr<Data::Draft> &&draft);
void clearLocalDraft();
void clearCloudDraft();
@@ -501,6 +504,8 @@ private:
std::unique_ptr<Data::Draft> _localDraft, _cloudDraft;
std::unique_ptr<Data::Draft> _editDraft;
base::optional<QString> _lastSentDraftText;
TimeId _lastSentDraftTime = 0;
MessageIdsList _forwardDraft;
using TypingUsers = QMap<UserData*, TimeMs>;