Skip to content

Commit

Permalink
Cleanup comments/minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukePeavey committed Mar 13, 2019
1 parent 15eefaa commit 6cd7fd0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ class App extends React.Component {
const data = await CameraRoll.getPhotos({
first: 500,
assetType: 'Photos',
groupTypes: 'SavedPhotos',
})
// Transform the data into an object map in which they keys are item IDs
// and values are the corresponding item.
const photos = data.edges.reduce((ret, val) => {
const { group_name, ...rest } = val.node
const photos = data.edges.reduce((result, { node }) => {
const { group_name, timestamp, ...rest } = node
const item = {
id: rest.image.filename,
groupName: group_name,
timestamp: timestamp * 1000,
...rest,
}
return { ...ret, [item.id]: item }
return { ...result, [item.id]: item }
}, {})
// Save photos to redux state
dispatch(actions.photos.savePhotos(photos))
Expand Down
1 change: 0 additions & 1 deletion src/screens/PhotosScreen/PhotosScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export default class PhotosScreen extends React.Component {
const { navigation } = this.props
navigation.navigate('SlideShow', {
initialIndex: index,
isFullscreen: true,
image,
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/screens/SingleAlbumScreen/SingleAlbumScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default class SingleAlbum extends React.Component {
navigation.navigate('SlideShow', {
albumName: navigation.getParam('albumName'),
initialIndex: index,
isFullscreen: true,
fullScreen: false,
image,
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/store/photos/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const actions = {
const timeout = Math.floor(idx++ / 49) * 2000
// Send a reverse-geocode request to the Google Maps API.
// Converts the latitude,longitude to an human readable address.
// Returns an array `[LATITUDE_LONGITUDE, Address || null]`
// Returns an array `[imageID, Address || null]`
return reverseGeocode(item, timeout)
}
})
Expand Down
Empty file removed src/views/x.text
Empty file.

0 comments on commit 6cd7fd0

Please sign in to comment.