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

Unified and moved to single place generating of song name from SongData.

This commit is contained in:
23rd
2021-05-30 01:26:58 +03:00
committed by John Preston
parent f98e8f3e04
commit 690fbe83fd
17 changed files with 191 additions and 116 deletions

View File

@@ -40,7 +40,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/confirm_box.h"
#include "ui/image/image.h"
#include "ui/text/text_utilities.h"
#include "ui/text/format_values.h"
#include "base/base_file_utilities.h"
#include "mainwindow.h"
#include "core/application.h"
@@ -1464,16 +1463,6 @@ uint8 DocumentData::cacheTag() const {
return 0;
}
QString DocumentData::composeNameString() const {
if (auto songData = song()) {
return Ui::ComposeNameString(
_filename,
songData->title,
songData->performer);
}
return Ui::ComposeNameString(_filename, QString(), QString());
}
LocationType DocumentData::locationType() const {
return isVoiceMessage()
? AudioFileLocation