2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 07:05:13 +00:00

Don't autodownload files if sandbox prevents it.

Partially fixes #25308.
This commit is contained in:
John Preston
2022-11-08 18:24:08 +04:00
parent ab5792f59f
commit 092923fe6e
4 changed files with 9 additions and 2 deletions

View File

@@ -587,6 +587,12 @@ void Application::saveSettings() {
Local::writeSettings();
}
bool Application::canSaveFileWithoutAskingForPath() const {
return !Core::App().settings().askDownloadPath()
&& (!KSandbox::isInside()
|| !Core::App().settings().downloadPath().isEmpty());
}
MTP::Config &Application::fallbackProductionConfig() const {
if (!_fallbackProductionConfig) {
_fallbackProductionConfig = std::make_unique<MTP::Config>(