2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Hide default download folder option if it's not available

This commit is contained in:
Ilya Fedin
2022-12-29 12:49:03 +04:00
committed by John Preston
parent 7a64725045
commit 0eec470387
6 changed files with 30 additions and 18 deletions

View File

@@ -1055,7 +1055,9 @@ void SetupDataStorage(
auto pathtext = Core::App().settings().downloadPathValue(
) | rpl::map([](const QString &text) {
if (text.isEmpty()) {
return tr::lng_download_path_default(tr::now);
return Core::App().canReadDefaultDownloadPath(true)
? tr::lng_download_path_default(tr::now)
: tr::lng_download_path_unset(tr::now);
} else if (text == FileDialog::Tmp()) {
return tr::lng_download_path_temp(tr::now);
}