use default path in windows when choosing a file #7625

Merged
ByronEricPerez merged 2 commits from Minor_UI_issue-_Choose_File_opens_LBRY_install_folder_on_windows_#1811 into master 2022-06-28 21:49:41 +02:00
ByronEricPerez commented 2022-06-24 21:50:36 +02:00 (Migrated from github.com)

Fixes

Issue Number: https://github.com/lbryio/lbry-desktop/issues/1811

What is the current behavior?

Currently the "Choose File" button opens the root folder of the program and not "My documents" or "My computer" which generates confusion in new users, this error only happens in windows.

What is the new behavior?

Clicking on the "Choose File" button opens the user's root folder.

Other information

PR Checklist

Toggle...

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes)
  • Documentation changes
  • Other - Please describe:

Please check all that apply to this PR using "x":

  • I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • I added a line describing my change to CHANGELOG.md
  • I have checked that this PR does not introduce a breaking change
  • This PR introduces breaking changes and I have provided a detailed explanation below
## Fixes Issue Number: https://github.com/lbryio/lbry-desktop/issues/1811 <!-- Tip: - Add keywords to directly close the Issue when the PR is merged. - Skip the keyword if the Issue contains multiple items. - https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword --> ## What is the current behavior? Currently the "Choose File" button opens the root folder of the program and not "My documents" or "My computer" which generates confusion in new users, this error only happens in windows. ## What is the new behavior? Clicking on the "Choose File" button opens the user's root folder. ## Other information <!-- If this PR contains a breaking change, please describe the impact and solution strategy for existing applications below. --> ## PR Checklist <!-- For the checkbox formatting to work properly, make sure there are no spaces on either side of the "x" --> <details><summary>Toggle...</summary> What kind of change does this PR introduce? - [x] Bugfix - [ ] Feature - [ ] Code style update (formatting) - [ ] Refactoring (no functional changes) - [ ] Documentation changes - [ ] Other - Please describe: Please check all that apply to this PR using "x": - [x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged) - [ ] I added a line describing my change to CHANGELOG.md - [x] I have checked that this PR does not introduce a breaking change - [ ] This PR introduces breaking changes and I have provided a detailed explanation below </details>
jessopb (Migrated from github.com) approved these changes 2022-06-24 22:24:42 +02:00
jessopb (Migrated from github.com) left a comment

Nice, thanks!

Nice, thanks!
jessopb (Migrated from github.com) commented 2022-06-24 22:13:34 +02:00

Just a minor nitpick, but it's usually better to use let when you can.

Just a minor nitpick, but it's usually better to use `let` when you can.
@ -51,1 +65,4 @@
}
remote.dialog.showOpenDialog({ properties, defaultPath }).then((result) => {
const path = result && result.filePaths[0];
jessopb (Migrated from github.com) commented 2022-06-24 22:24:13 +02:00

nice,
tested in console in linux
x = require('@electron/remote')
x.dialog.showOpenDialog({properties: ['openFile'], defaultPath: undefined})
And it worked fine.

nice, tested in console in linux `x = require('@electron/remote')` `x.dialog.showOpenDialog({properties: ['openFile'], defaultPath: undefined})` And it worked fine.
jessopb (Migrated from github.com) approved these changes 2022-06-28 21:49:30 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#7625
No description provided.