import React from 'react'; import { View, Button, Alert, Text } from 'react-native'; // Redux import { connect } from 'react-redux'; // Style import styles from '../../Resources/Styles/SyncStyle'; // Translations import i18n from "../../I18n"; // Controller import SyncController from '../Controllers/SyncController'; // Progress import * as Progress from 'react-native-progress'; // Database import { User, Contact, Directory, Document } from '../../Database'; // FileSytem import * as FileSystem from 'expo-file-system'; function mapStateToProps(state) { return { documents: state.app.documents, syncVersion: state.app.syncVersion, currentUser: state.app.currentUser, }; } class SyncScreen extends React.Component { state = { progress: 0, txtStep: '', downloadProgress: 0, downloadingFile: false, processing: false, newApp: false }; componentDidMount() { const { forceSync } = this.props.route.params; if (forceSync === true) { this.sync(); } } render() { const fileProgress = this.fileProgress(); return (