mirror of https://github.com/procxx/kepka.git
Fixed uploading edit media with thumbnails.
This commit is contained in:
parent
820c7ba84e
commit
c84f99cf3a
|
@ -4204,7 +4204,8 @@ void HistoryWidget::subscribeToUploader() {
|
||||||
data.fullId,
|
data.fullId,
|
||||||
data.silent,
|
data.silent,
|
||||||
data.file,
|
data.file,
|
||||||
data.thumb);
|
data.thumb,
|
||||||
|
data.edit);
|
||||||
}, _uploaderSubscriptions);
|
}, _uploaderSubscriptions);
|
||||||
Auth().uploader().documentProgress(
|
Auth().uploader().documentProgress(
|
||||||
) | rpl::start_with_next([=](const FullMsgId &fullId) {
|
) | rpl::start_with_next([=](const FullMsgId &fullId) {
|
||||||
|
@ -4422,8 +4423,11 @@ void HistoryWidget::thumbDocumentUploaded(
|
||||||
const FullMsgId &newId,
|
const FullMsgId &newId,
|
||||||
bool silent,
|
bool silent,
|
||||||
const MTPInputFile &file,
|
const MTPInputFile &file,
|
||||||
const MTPInputFile &thumb) {
|
const MTPInputFile &thumb,
|
||||||
Auth().api().sendUploadedDocument(newId, file, thumb, silent);
|
bool edit) {
|
||||||
|
edit
|
||||||
|
? Auth().api().editUploadedDocument(newId, file, thumb, silent)
|
||||||
|
: Auth().api().sendUploadedDocument(newId, file, thumb, silent);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::photoProgress(const FullMsgId &newId) {
|
void HistoryWidget::photoProgress(const FullMsgId &newId) {
|
||||||
|
|
|
@ -458,7 +458,8 @@ private:
|
||||||
const FullMsgId &msgId,
|
const FullMsgId &msgId,
|
||||||
bool silent,
|
bool silent,
|
||||||
const MTPInputFile &file,
|
const MTPInputFile &file,
|
||||||
const MTPInputFile &thumb);
|
const MTPInputFile &thumb,
|
||||||
|
bool edit = false);
|
||||||
void documentProgress(const FullMsgId &msgId);
|
void documentProgress(const FullMsgId &msgId);
|
||||||
void documentFailed(const FullMsgId &msgId);
|
void documentFailed(const FullMsgId &msgId);
|
||||||
|
|
||||||
|
|
|
@ -362,7 +362,8 @@ void Uploader::sendNext() {
|
||||||
uploadingId,
|
uploadingId,
|
||||||
silent,
|
silent,
|
||||||
file,
|
file,
|
||||||
thumb });
|
thumb,
|
||||||
|
uploadingData.file->edit });
|
||||||
} else {
|
} else {
|
||||||
_documentReady.fire({ uploadingId, silent, file, uploadingData.file->edit });
|
_documentReady.fire({ uploadingId, silent, file, uploadingData.file->edit });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue