mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-24 03:07:20 +00:00
24 lines
598 B
C++
24 lines
598 B
C++
|
/*
|
||
|
This file is part of Telegram Desktop,
|
||
|
the official desktop application for the Telegram messaging service.
|
||
|
|
||
|
For license and copyright information please follow this link:
|
||
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||
|
*/
|
||
|
#include "ui/text/format_song_document_name.h"
|
||
|
|
||
|
#include "data/data_document.h"
|
||
|
|
||
|
namespace Ui::Text {
|
||
|
|
||
|
FormatSongName FormatSongNameFor(not_null<DocumentData*> document) {
|
||
|
const auto song = document->song();
|
||
|
|
||
|
return FormatSongName(
|
||
|
document->filename(),
|
||
|
song ? song->title : QString(),
|
||
|
song ? song->performer : QString());
|
||
|
}
|
||
|
|
||
|
} // namespace Ui::Text
|