fix errors and user shared state

This commit is contained in:
Akinwale Ariwodola 2019-09-23 09:41:02 +01:00
parent 63655270f2
commit deb863a94c
5 changed files with 12 additions and 12 deletions

8
package-lock.json generated
View file

@ -5574,8 +5574,8 @@
}
},
"lbry-redux": {
"version": "github:lbryio/lbry-redux#e5443aafcfa7450c97e4edf838859352be6ca220",
"from": "github:lbryio/lbry-redux#e5443aafcfa7450c97e4edf838859352be6ca220",
"version": "github:lbryio/lbry-redux#f6d24c54baf5ff4e67aba90684dc6e55fe9cbecc",
"from": "github:lbryio/lbry-redux#f6d24c54baf5ff4e67aba90684dc6e55fe9cbecc",
"requires": {
"proxy-polyfill": "0.1.6",
"reselect": "^3.0.0",
@ -5583,8 +5583,8 @@
}
},
"lbryinc": {
"version": "github:lbryio/lbryinc#b9f354ae50bd57691765a7d042c5054167878bf4",
"from": "github:lbryio/lbryinc#b9f354ae50bd57691765a7d042c5054167878bf4",
"version": "github:lbryio/lbryinc#745d3cba93b7956fc16fb56df1fe265bc25ebc87",
"from": "github:lbryio/lbryinc#745d3cba93b7956fc16fb56df1fe265bc25ebc87",
"requires": {
"reselect": "^3.0.0"
}

View file

@ -12,8 +12,8 @@
"base-64": "^0.1.0",
"@expo/vector-icons": "^8.1.0",
"gfycat-style-urls": "^1.0.3",
"lbry-redux": "lbryio/lbry-redux#e5443aafcfa7450c97e4edf838859352be6ca220",
"lbryinc": "lbryio/lbryinc#b9f354ae50bd57691765a7d042c5054167878bf4",
"lbry-redux": "lbryio/lbry-redux#f6d24c54baf5ff4e67aba90684dc6e55fe9cbecc",
"lbryinc": "lbryio/lbryinc#745d3cba93b7956fc16fb56df1fe265bc25ebc87",
"lodash": ">=4.17.11",
"merge": ">=1.2.1",
"moment": "^2.22.1",

View file

@ -26,7 +26,7 @@ export default class ChannelSelector extends React.PureComponent {
}
componentDidMount() {
const { channels, channelName, fetchChannelListMine, fetchingChannels } = this.props;
const { channels = [], channelName, fetchChannelListMine, fetchingChannels } = this.props;
if (!channels.length && !fetchingChannels) {
fetchChannelListMine();
}

View file

@ -154,7 +154,7 @@ store.subscribe(() => {
const tags = state.tags.followedTags;
const newPayload = {
version: '0',
version: '0.1',
shared: {
subscriptions,
tags,
@ -163,7 +163,9 @@ store.subscribe(() => {
if (!isEqual(newPayload, currentPayload)) {
currentPayload = newPayload;
Lbryio.call('user_settings', 'set', { settings: JSON.stringify(newPayload) });
if (Lbryio.authToken) {
Lbryio.call('user_settings', 'set', { settings: JSON.stringify(newPayload) });
}
}
});

View file

@ -611,8 +611,6 @@ class PublishPage extends React.PureComponent {
});
};
handleUploadPressed = () => {};
getRandomFileId = () => {
// generate a random id for a photo or recorded video between 1 and 20 (for creating thumbnails)
const id = Math.floor(Math.random() * (20 - 2)) + 1;
@ -832,7 +830,7 @@ class PublishPage extends React.PureComponent {
<TouchableOpacity
style={[
publishStyle.photo,
canUseCamera ? publishStyle.transparentBackground : publishStyle.actionBackground,
canUseCamera ? publishStyle.transparentBackground : publishStyle.acftionBackground,
]}
onPress={this.handleTakePhotoPressed}
>