2017-12-21 18:32:51 +01:00
|
|
|
// eslint-disable-next-line import/prefer-default-export
|
|
|
|
export function doFetchAvailability() {
|
|
|
|
return function() {
|
2017-09-20 14:47:08 +02:00
|
|
|
/*
|
|
|
|
this is disabled atm - Jeremy
|
|
|
|
*/
|
2017-12-21 18:32:51 +01:00
|
|
|
// const state = getState();
|
|
|
|
// const alreadyFetching = !!selectFetchingAvailability(state)[uri];
|
|
|
|
//
|
|
|
|
// if (!alreadyFetching) {
|
|
|
|
// dispatch({
|
|
|
|
// type: ACTIONS.FETCH_AVAILABILITY_STARTED,
|
|
|
|
// data: { uri },
|
|
|
|
// });
|
|
|
|
//
|
|
|
|
// lbry.get_availability({ uri }).then(availability => {
|
|
|
|
// dispatch({
|
|
|
|
// type: ACTIONS.FETCH_AVAILABILITY_COMPLETED,
|
|
|
|
// data: {
|
|
|
|
// availability,
|
|
|
|
// uri,
|
|
|
|
// },
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
// }
|
2017-06-06 23:19:12 +02:00
|
|
|
};
|
2017-06-06 06:21:55 +02:00
|
|
|
}
|