diff --git a/Telegram/SourceFiles/fileuploader.h b/Telegram/SourceFiles/fileuploader.h index 68476043f..26b542bdb 100644 --- a/Telegram/SourceFiles/fileuploader.h +++ b/Telegram/SourceFiles/fileuploader.h @@ -102,13 +102,13 @@ private: ReadyLocalMedia media; int32 partsCount; - const uint64 &id() const { + uint64 id() const { return file ? file->id : media.id; } PrepareMediaType type() const { return file ? file->type : media.type; } - const uint64 &thumbId() const { + uint64 thumbId() const { return file ? file->thumbId : media.thumbId; } const QString &filename() const { diff --git a/Telegram/SourceFiles/localimageloader.h b/Telegram/SourceFiles/localimageloader.h index 3b3770f9e..35f12c630 100644 --- a/Telegram/SourceFiles/localimageloader.h +++ b/Telegram/SourceFiles/localimageloader.h @@ -175,7 +175,7 @@ struct FileLoadTo { }; struct FileLoadResult { - FileLoadResult(const uint64 &id, const FileLoadTo &to) : id(id), to(to), type(PrepareAuto), thumbId(0), filesize(0) { + FileLoadResult(const uint64 &id, const FileLoadTo &to) : id(id), to(to), type(PrepareAuto), filesize(0), thumbId(0) { } uint64 id;