2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Remove RTL Override symbols from filenames.

This commit is contained in:
John Preston
2017-11-05 15:00:48 +04:00
parent cb5c59c86c
commit aec496d520
12 changed files with 154 additions and 68 deletions

View File

@@ -52,7 +52,9 @@ TextWithEntities ComposeNameWithEntities(DocumentData *document) {
TextWithEntities result;
auto song = document->song();
if (!song || (song->title.isEmpty() && song->performer.isEmpty())) {
result.text = document->name.isEmpty() ? qsl("Unknown File") : document->name;
result.text = document->filename().isEmpty()
? qsl("Unknown File")
: document->filename();
result.entities.push_back({ EntityInTextBold, 0, result.text.size() });
} else if (song->performer.isEmpty()) {
result.text = song->title;
@@ -1037,7 +1039,7 @@ bool Document::withThumb() const {
&& !_data->thumb->isNull()
&& _data->thumb->width()
&& _data->thumb->height()
&& !documentIsExecutableName(_data->name);
&& !documentIsExecutableName(_data->filename());
}
bool Document::updateStatusText() {