Fix Diff Sync
This commit is contained in:
parent
4037bfae6d
commit
1cf6ed3cb3
2 changed files with 6 additions and 6 deletions
|
|
@ -77,6 +77,7 @@ class HomeScreen extends React.Component {
|
|||
<View style={styles.container}>
|
||||
{this.renderBtns()}
|
||||
<TouchableOpacity
|
||||
key={'OnlyVideos'}
|
||||
onPress={() => {
|
||||
this.props.initDocuments(this.props.locale, this.props.directories.global);
|
||||
this.props.navigation.navigate('OnlyVideosScreen');
|
||||
|
|
@ -85,7 +86,7 @@ class HomeScreen extends React.Component {
|
|||
<Image source={{ uri: FileSystem.documentDirectory + 'HomeButtonImage.png' }} style={styles.btnImg} />
|
||||
<Text style={styles.btnTxt}>{i18n.t('global.videos')}</Text>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity onPress={() => this.props.navigation.navigate('ContactScreen')} style={styles.button}>
|
||||
<TouchableOpacity key={'Contacts'} onPress={() => this.props.navigation.navigate('ContactScreen')} style={styles.button}>
|
||||
<Image source={{ uri: FileSystem.documentDirectory + 'HomeButtonImage.png' }} style={styles.btnImg} />
|
||||
<Text style={styles.btnTxt}>{i18n.t('global.contacts')}</Text>
|
||||
</TouchableOpacity>
|
||||
|
|
@ -102,7 +103,7 @@ class HomeScreen extends React.Component {
|
|||
let names = JSON.parse(item.name);
|
||||
let name = (locale in names) ? names[locale] : names.fr;
|
||||
return (
|
||||
<TouchableOpacity onPress={() => this.openFolder(item.id)} style={styles.button}>
|
||||
<TouchableOpacity key={index} onPress={() => this.openFolder(item.id)} style={styles.button}>
|
||||
<Image source={{ uri: FileSystem.documentDirectory + 'HomeButtonImage.png' }} style={styles.btnImg} />
|
||||
<Text style={styles.btnTxt}>{name}</Text>
|
||||
</TouchableOpacity>
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ class SyncScreen extends React.Component {
|
|||
resDocuments.forEach(document => {
|
||||
Document.update(document);
|
||||
});
|
||||
this.downloadDocuments(resDocuments, toDelete);
|
||||
this.downloadDocuments(Document.getAll(), toDelete);
|
||||
// End
|
||||
this.setState({ txtStep: i18n.t('sync_s.update_completed') + '.', processing: false });
|
||||
}
|
||||
|
|
@ -275,8 +275,7 @@ class SyncScreen extends React.Component {
|
|||
') ...',
|
||||
});
|
||||
try {
|
||||
//console.log(endpoint + doc.uuid + "." + doc.type);
|
||||
const { uri } = await this.downloadResumable(
|
||||
await this.downloadResumable(
|
||||
endpoint + doc.uuid + "." + doc.type,
|
||||
doc.uuid,
|
||||
doc.type,
|
||||
|
|
@ -296,7 +295,7 @@ class SyncScreen extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
finishSync() {
|
||||
finishSync(version) {
|
||||
this.props.init();
|
||||
this.props.initUsers();
|
||||
this.props.initContact(this.props.currentUser);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue