2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

new image / file confirm / send codepath made by Task / TaskQueue, sending single file paste and image paste / drop with that new code

This commit is contained in:
John Preston
2015-10-26 22:39:02 -04:00
parent c606d6b459
commit 31b1ecb11c
18 changed files with 778 additions and 135 deletions

View File

@@ -1108,7 +1108,7 @@ void MainWidget::onResendAsDocument() {
photo->full->forget();
QByteArray data = photo->full->savedData();
if (!data.isEmpty()) {
history.uploadMedia(data, ToPrepareDocument, item->history()->peer->id);
history.uploadMedia(data, PrepareDocument, item->history()->peer->id);
}
}
}
@@ -2046,6 +2046,16 @@ void MainWidget::updateOnlineDisplay() {
if (App::wnd()->settingsWidget()) App::wnd()->settingsWidget()->updateOnlineDisplay();
}
void MainWidget::onSendFileConfirm(const FileLoadResultPtr &file, bool ctrlShiftEnter) {
bool lastKeyboardUsed = history.lastForceReplyReplied(FullMsgId(peerToChannel(file->to.peer), file->to.replyTo));
history.confirmSendFile(file, ctrlShiftEnter);
history.cancelReply(lastKeyboardUsed);
}
void MainWidget::onSendFileCancel(const FileLoadResultPtr &file) {
history.cancelSendFile(file);
}
void MainWidget::confirmShareContact(bool ctrlShiftEnter, const QString &phone, const QString &fname, const QString &lname, MsgId replyTo) {
history.confirmShareContact(ctrlShiftEnter, phone, fname, lname, replyTo);
}