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

Use message date by default when saving a photo (#1586) (#3150)

Signed-off-by: Lonami <totufals@hotmail.com> (github: Lonami)
This commit is contained in:
Lonami
2017-04-04 11:14:32 +02:00
committed by John Preston
parent 3915957612
commit b7ea15b83d
3 changed files with 13 additions and 8 deletions

View File

@@ -785,7 +785,7 @@ void MediaView::onSaveAs() {
psBringToBack(this);
auto filter = qsl("JPEG Image (*.jpg);;") + FileDialog::AllFilesFilter();
FileDialog::GetWritePath(lang(lng_save_photo), filter, filedialogDefaultName(qsl("photo"), qsl(".jpg")), base::lambda_guarded(this, [this, photo = _photo](const QString &result) {
FileDialog::GetWritePath(lang(lng_save_photo), filter, filedialogDefaultName(qsl("photo"), qsl(".jpg"), QString(), false, _photo->date), base::lambda_guarded(this, [this, photo = _photo](const QString &result) {
if (!result.isEmpty() && _photo == photo && photo->loaded()) {
photo->full->pix().toImage().save(result, "JPG");
}