Skip to content

Commit

Permalink
feat: allow multi selection when importing character from file
Browse files Browse the repository at this point in the history
  • Loading branch information
Vali-98 committed Sep 21, 2024
1 parent e756c37 commit efc20d3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/constants/Characters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,14 @@ export namespace Characters {
return DocumentPicker.getDocumentAsync({
copyToCacheDirectory: true,
type: 'image/*',
multiple: true,
}).then((result) => {
if (result.canceled) return
return createCharacterFromImage(result.assets[0].uri)
result.assets.map(async (item) => {
await createCharacterFromImage(item.uri).catch((e) =>
Logger.log(`Failed to create card from '${item.name}': ${e}`)
)
})
})
}

Expand Down

0 comments on commit efc20d3

Please sign in to comment.