mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Added ability rename files from send files box.
This commit is contained in:
@@ -473,6 +473,7 @@ FileLoadTask::FileLoadTask(Args &&args)
|
||||
, _to(std::move(args.to))
|
||||
, _album(std::move(args.album))
|
||||
, _filepath(std::move(args.filepath))
|
||||
, _displayName(std::move(args.displayName))
|
||||
, _content(std::move(args.content))
|
||||
, _videoCover(std::move(args.videoCover))
|
||||
, _information(std::move(args.information))
|
||||
@@ -810,7 +811,11 @@ void FileLoadTask::process(ProcessArgs &&args) {
|
||||
QImage goodThumbnail;
|
||||
QByteArray goodThumbnailBytes;
|
||||
|
||||
QVector<MTPDocumentAttribute> attributes(1, MTP_documentAttributeFilename(MTP_string(filename)));
|
||||
auto attributes = QVector<MTPDocumentAttribute>(
|
||||
1,
|
||||
MTP_documentAttributeFilename(MTP_string(_displayName.isEmpty()
|
||||
? filename
|
||||
: _displayName)));
|
||||
|
||||
auto thumbnail = PreparedFileThumbnail();
|
||||
|
||||
|
||||
@@ -233,6 +233,7 @@ public:
|
||||
std::shared_ptr<SendingAlbum> album;
|
||||
bool forceFile = false;
|
||||
uint64 idOverride = 0;
|
||||
QString displayName;
|
||||
};
|
||||
|
||||
struct VoiceArgs {
|
||||
@@ -292,6 +293,7 @@ private:
|
||||
FileLoadTo _to;
|
||||
const std::shared_ptr<SendingAlbum> _album;
|
||||
QString _filepath;
|
||||
QString _displayName;
|
||||
QByteArray _content;
|
||||
std::unique_ptr<FileLoadTask> _videoCover;
|
||||
std::unique_ptr<Ui::PreparedFileInformation> _information;
|
||||
|
||||
Reference in New Issue
Block a user