2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

new photo viewer done, testing, added compressed checkbox in send-from-clipboard

This commit is contained in:
John Preston
2014-08-11 13:03:45 +04:00
parent f62db48251
commit d26afe1b64
29 changed files with 1274 additions and 491 deletions

View File

@@ -2669,9 +2669,19 @@ void HistoryWidget::uploadImage(const QImage &img) {
if (!hist || confirmImageId) return;
App::wnd()->activateWindow();
confirmImage = img;
confirmImageId = imageLoader.append(img, histPeer->id, ToPreparePhoto);
}
void HistoryWidget::uploadConfirmImageUncompressed() {
if (!hist || !confirmImageId || confirmImage.isNull()) return;
App::wnd()->activateWindow();
imageLoader.append(confirmImage, histPeer->id, ToPrepareDocument);
confirmImageId = 0;
confirmImage = QImage();
}
void HistoryWidget::uploadMedias(const QStringList &files, ToPrepareMediaType type) {
if (!hist) return;
@@ -2706,6 +2716,7 @@ void HistoryWidget::onPhotoFailed(quint64 id) {
void HistoryWidget::confirmSendImage(const ReadyLocalMedia &img) {
if (img.id == confirmImageId) {
confirmImageId = 0;
confirmImage = QImage();
}
MsgId newId = clientMsgId();
@@ -2737,6 +2748,7 @@ void HistoryWidget::confirmSendImage(const ReadyLocalMedia &img) {
void HistoryWidget::cancelSendImage() {
confirmImageId = 0;
confirmImage = QImage();
}
void HistoryWidget::onPhotoUploaded(MsgId newId, const MTPInputFile &file) {