Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
/githubPublic archive

Update to promise api for some methods in the electron API#2626

Merged
smashwilson merged 6 commits intoatom:masterfromasturur:promisification
Feb 14, 2021
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
use aync await syntax
  • Loading branch information
@asturur
asturur committedFeb 14, 2021
commit0463c16d708ee544b16506788e1802937aaf77e1
12 changes: 6 additions & 6 deletionslib/views/directory-select.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -45,13 +45,13 @@ export default class DirectorySelect extends React.Component {
);
}

chooseDirectory = () =>
this.props.showOpenDialog(this.props.currentWindow, {
chooseDirectory =async() => {
const {filePaths} = awaitthis.props.showOpenDialog(this.props.currentWindow, {
defaultPath: this.props.buffer.getText(),
properties: ['openDirectory', 'createDirectory', 'promptToCreate'],
}).then(({filePaths}) => {
if (filePaths.length) {
this.props.buffer.setText(filePaths[0]);
}
});
if (filePaths.length) {
this.props.buffer.setText(filePaths[0]);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

👍 Perfect!

}

[8]ページ先頭

©2009-2025 Movatter.jp