|
|
@ -197,12 +197,14 @@ public slots: |
|
|
|
textBeforeEdit = text(); |
|
|
|
textBeforeEdit = text(); |
|
|
|
mentionsBefore = mentions_; |
|
|
|
mentionsBefore = mentions_; |
|
|
|
mentionTextsBefore = mentionTexts_; |
|
|
|
mentionTextsBefore = mentionTexts_; |
|
|
|
|
|
|
|
containsAtRoomBefore = containsAtRoom_; |
|
|
|
emit mentionsChanged(); |
|
|
|
emit mentionsChanged(); |
|
|
|
} |
|
|
|
} |
|
|
|
void restoreAfterEdit() |
|
|
|
void restoreAfterEdit() |
|
|
|
{ |
|
|
|
{ |
|
|
|
mentions_ = mentionsBefore; |
|
|
|
mentions_ = mentionsBefore; |
|
|
|
mentionTexts_ = mentionTextsBefore; |
|
|
|
mentionTexts_ = mentionTextsBefore; |
|
|
|
|
|
|
|
containsAtRoom_ = containsAtRoomBefore; |
|
|
|
mentionsBefore.clear(); |
|
|
|
mentionsBefore.clear(); |
|
|
|
mentionTextsBefore.clear(); |
|
|
|
mentionTextsBefore.clear(); |
|
|
|
setText(textBeforeEdit); |
|
|
|
setText(textBeforeEdit); |
|
|
@ -216,6 +218,9 @@ public slots: |
|
|
|
|
|
|
|
|
|
|
|
mentions_ = newMentions; |
|
|
|
mentions_ = newMentions; |
|
|
|
mentionTexts_ = newMentionTexts; |
|
|
|
mentionTexts_ = newMentionTexts; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this->containsAtRoom_ = newMentions.contains(u"@room"); |
|
|
|
|
|
|
|
|
|
|
|
emit mentionsChanged(); |
|
|
|
emit mentionsChanged(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -331,6 +336,7 @@ private: |
|
|
|
// store stuff during edits
|
|
|
|
// store stuff during edits
|
|
|
|
QStringList mentionsBefore, mentionTextsBefore; |
|
|
|
QStringList mentionsBefore, mentionTextsBefore; |
|
|
|
QString textBeforeEdit; |
|
|
|
QString textBeforeEdit; |
|
|
|
|
|
|
|
bool containsAtRoomBefore = false; |
|
|
|
|
|
|
|
|
|
|
|
using UploadHandle = std::unique_ptr<MediaUpload, DeleteLaterDeleter>; |
|
|
|
using UploadHandle = std::unique_ptr<MediaUpload, DeleteLaterDeleter>; |
|
|
|
std::vector<UploadHandle> unconfirmedUploads; |
|
|
|
std::vector<UploadHandle> unconfirmedUploads; |
|
|
|