fix(wallets): folder picker opens in the DRAGONX data directory

"Scan another folder" now anchors the picker at getDragonXDataDir() (where the
datadir wallets live) instead of home, so the user starts from a familiar spot
and navigates up/out to find wallets elsewhere.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-10 14:53:18 -05:00
parent 3df516be70
commit ed4d61c364

View File

@@ -245,8 +245,10 @@ public:
ImGui::Dummy(ImVec2(0, Layout::spacingSm()));
// ---- Scan another folder — always visible, full-width, opens the in-app folder picker -
// Start in the DRAGONX data directory (where the datadir wallets live) so the user can
// navigate up/out from a familiar anchor to find wallets in other folders.
if (StyledButton(TR("wallets_scan_folder"), ImVec2(listW, 0))) {
FolderPicker::open("", [app](const std::string& dir) {
FolderPicker::open(util::Platform::getDragonXDataDir(), [app](const std::string& dir) {
std::error_code ec;
if (!dir.empty() && std::filesystem::is_directory(dir, ec)) {
if (app->walletIndex().addExtraFolder(dir)) app->walletIndex().save();