mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-10 11:25:30 +00:00
Unify gtk/xdp file dialog getters
This commit is contained in:
@@ -681,12 +681,15 @@ bool Get(
|
||||
}
|
||||
dialog.selectFile(startFile);
|
||||
|
||||
int res = dialog.exec();
|
||||
const auto res = dialog.exec();
|
||||
|
||||
QString path = dialog.directory().absolutePath();
|
||||
if (path != cDialogLastPath()) {
|
||||
cSetDialogLastPath(path);
|
||||
Local::writeSettings();
|
||||
if (type != Type::ReadFolder) {
|
||||
// Save last used directory for all queries except directory choosing.
|
||||
const auto path = dialog.directory().absolutePath();
|
||||
if (!path.isEmpty() && path != cDialogLastPath()) {
|
||||
cSetDialogLastPath(path);
|
||||
Local::writeSettings();
|
||||
}
|
||||
}
|
||||
|
||||
if (res == QDialog::Accepted) {
|
||||
|
Reference in New Issue
Block a user