download: function(lesson) { LessonsManager.downloadLesson(lesson); },
isDownloading: function(lesson, callback) { LessonsManager.isDownloading(lesson, (error, downloadingCurrLess, downloadingOtherLesson) => { callback(downloadingCurrLess, downloadingOtherLesson); }); },
isDownloaded: function(lesson, callback) { LessonsManager.isDownloaded(lesson, (error, result) => { callback(result); }); },
getCached: function(callback) { LessonsManager.cachedLessons((error, result) => { var cachedLessons = error ? [] : result; callback(cachedLessons); }); },
refresh: function(remoteLessons) { _lessons = remoteLessons; LessonsManager.refreshLessonsWith(remoteLessons); },
'use strict'; var React = require('react-native'); var LessonsManager = require('NativeModules').RPLessonsManager; LessonsManager.clearTemporaryPath(); var { AppRegistry, StyleSheet, NavigatorIOS, } = React; var LessonsView = require('./App/Views/Lessons'); var RealPolish = React.createClass({ render: function() { return ( <NavigatorIOS style={styles.container} barTintColor='#E45C4E' titleTextColor='white' navigationBarHidden={true} initialRoute={{ title: 'Real Polish', component: LessonsView, backButtonTitle: 'Back' }}/> ); } });