mirror of https://github.com/procxx/kepka.git
parent
661de0c326
commit
2661f81fd1
|
@ -5784,10 +5784,8 @@ void HistoryWidget::setFieldText(
|
||||||
_textUpdateEvents = TextUpdateEvent::SaveDraft
|
_textUpdateEvents = TextUpdateEvent::SaveDraft
|
||||||
| TextUpdateEvent::SendTyping;
|
| TextUpdateEvent::SendTyping;
|
||||||
|
|
||||||
|
previewCancel();
|
||||||
_previewCancelled = false;
|
_previewCancelled = false;
|
||||||
_previewData = nullptr;
|
|
||||||
MTP::cancel(base::take(_previewRequest));
|
|
||||||
_previewLinks.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::clearFieldText(
|
void HistoryWidget::clearFieldText(
|
||||||
|
@ -6126,10 +6124,6 @@ void HistoryWidget::previewCancel() {
|
||||||
_previewData = nullptr;
|
_previewData = nullptr;
|
||||||
_previewLinks.clear();
|
_previewLinks.clear();
|
||||||
updatePreview();
|
updatePreview();
|
||||||
if (!_editMsgId && !_replyToId && !readyToForward() && !_kbReplyTo) {
|
|
||||||
_fieldBarCancel->hide();
|
|
||||||
updateMouseTracking();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::checkPreview() {
|
void HistoryWidget::checkPreview() {
|
||||||
|
@ -6142,10 +6136,7 @@ void HistoryWidget::checkPreview() {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
if (_previewCancelled || previewRestricted()) {
|
if (_previewCancelled || previewRestricted()) {
|
||||||
MTP::cancel(base::take(_previewRequest));
|
previewCancel();
|
||||||
_previewData = nullptr;
|
|
||||||
_previewLinks.clear();
|
|
||||||
update();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto newLinks = _parsedLinks.join(' ');
|
const auto newLinks = _parsedLinks.join(' ');
|
||||||
|
@ -6210,7 +6201,7 @@ void HistoryWidget::gotPreview(QString links, const MTPMessageMedia &result, mtp
|
||||||
} else if (result.type() == mtpc_messageMediaEmpty) {
|
} else if (result.type() == mtpc_messageMediaEmpty) {
|
||||||
_previewCache.insert(links, 0);
|
_previewCache.insert(links, 0);
|
||||||
if (links == _previewLinks && !_previewCancelled) {
|
if (links == _previewLinks && !_previewCancelled) {
|
||||||
_previewData = 0;
|
_previewData = nullptr;
|
||||||
updatePreview();
|
updatePreview();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue