Skip to content

Commit

Permalink
Update AddFiles.jsx (#4894)
Browse files Browse the repository at this point in the history
Uncouple the native camera and video buttons from the option disableLocalFiles to solve issue #4430
  • Loading branch information
jakemcallister authored Feb 1, 2024
1 parent 5b316f8 commit 93c5e0a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/@uppy/dashboard/src/components/AddFiles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,9 @@ class AddFiles extends Component {

const myDeviceKey = 'myDevice'

if (!disableLocalFiles) {
list.push({ key: myDeviceKey, elements: this.renderMyDeviceAcquirer() })
if (showNativePhotoCameraButton) list.push({ key: 'nativePhotoCameraButton', elements: this.renderPhotoCamera() })
if (showNativeVideoCameraButton) list.push({ key: 'nativePhotoCameraButton', elements: this.renderVideoCamera() })
}
if (!disableLocalFiles) list.push({ key: myDeviceKey, elements: this.renderMyDeviceAcquirer() })
if (showNativePhotoCameraButton) list.push({ key: 'nativePhotoCameraButton', elements: this.renderPhotoCamera() })
if (showNativeVideoCameraButton) list.push({ key: 'nativePhotoCameraButton', elements: this.renderVideoCamera() })
list.push(...acquirers.map((acquirer) => ({ key: acquirer.id, elements: this.renderAcquirer(acquirer) })))

// doesn't make sense to show only a lonely "My Device"
Expand Down

0 comments on commit 93c5e0a

Please sign in to comment.