mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Use Main::Session in download/upload.
This commit is contained in:
@@ -157,13 +157,15 @@ void ShowInFolder(const QString &filepath) {
|
||||
});
|
||||
}
|
||||
|
||||
QString DefaultDownloadPath() {
|
||||
QString DefaultDownloadPathFolder(not_null<Main::Session*> session) {
|
||||
return session->supportMode() ? u"Tsupport Desktop"_q : AppName.utf16();
|
||||
}
|
||||
|
||||
QString DefaultDownloadPath(not_null<Main::Session*> session) {
|
||||
return QStandardPaths::writableLocation(
|
||||
QStandardPaths::DownloadLocation)
|
||||
+ '/'
|
||||
+ (Main::Session::Exists() && Auth().supportMode()
|
||||
? "Tsupport Desktop"_cs
|
||||
: AppName).utf16()
|
||||
+ DefaultDownloadPathFolder(session)
|
||||
+ '/';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user