Changeset View
Changeset View
Standalone View
Standalone View
native/media/media-gallery-keyboard.react.js
Show First 20 Lines • Show All 183 Lines • ▼ Show 20 Lines | try { | ||||
} | } | ||||
const { | const { | ||||
assets, | assets, | ||||
endCursor, | endCursor, | ||||
hasNextPage, | hasNextPage, | ||||
} = await MediaLibrary.getAssetsAsync({ | } = await MediaLibrary.getAssetsAsync({ | ||||
first: 20, | first: 20, | ||||
after, | after, | ||||
// Include `MediaLibrary.MediaType.video` in `mediaType` array | mediaType: [MediaLibrary.MediaType.photo, MediaLibrary.MediaType.video], | ||||
// when working on video messages so videos show up in media gallery. | |||||
mediaType: [MediaLibrary.MediaType.photo], | |||||
}); | }); | ||||
let firstRemoved = false, | let firstRemoved = false, | ||||
lastRemoved = false; | lastRemoved = false; | ||||
const mediaURIs = this.state.selections | const mediaURIs = this.state.selections | ||||
? this.state.selections.map(({ uri }) => uri) | ? this.state.selections.map(({ uri }) => uri) | ||||
: []; | : []; | ||||
▲ Show 20 Lines • Show All 355 Lines • Show Last 20 Lines |