diff --git a/AnimeGo/src/app/App.android.js b/AnimeGo/src/app/App.android.js index 85085bf..b36cf45 100644 --- a/AnimeGo/src/app/App.android.js +++ b/AnimeGo/src/app/App.android.js @@ -10,7 +10,7 @@ import { Router, Scene, Actions } from 'react-native-router-flux'; import { DrawerCell, SmartTouchable } from '../component'; import { Divider, Button, Icon } from 'react-native-elements'; import { AdMobInterstitial } from 'react-native-admob'; -import { NewRelease, NewSeason, Movie, Popular, Genre, Setting, GenreInfo, WatchAnime, AnimeDetail, SearchAnime, SubCategory } from '../screen'; +import { NewRelease, NewSeason, Movie, Popular, Genre, Setting, GenreInfo, WatchAnime, AnimeDetail, SearchAnime, SubCategory, ToWatch } from '../screen'; import { AnimeGoColour, StatusBarColour, ScreenIndex } from '../value'; import { styles } from './AppStyle'; import { DataManager } from '../helper/'; @@ -46,6 +46,7 @@ export default class App extends Component { + @@ -67,6 +68,7 @@ export default class App extends Component { this.onChangingScreen(ScreenIndex.Popular)}/> this.onChangingScreen(ScreenIndex.Genre)}/> + this.onChangingScreen(ScreenIndex.ToWatch)}/> this.onChangingScreen(ScreenIndex.Setting)}/> this.showAd()}/> @@ -119,6 +121,8 @@ export default class App extends Component { Actions.Genre(); break; case ScreenIndex.Setting: Actions.Setting(); break; + case ScreenIndex.ToWatch: + Actions.ToWatch(); break; } this.refs['Drawer'].closeDrawer(); } diff --git a/AnimeGo/src/component/list/AnimeList.js b/AnimeGo/src/component/list/AnimeList.js index 5f3434f..9592912 100644 --- a/AnimeGo/src/component/list/AnimeList.js +++ b/AnimeGo/src/component/list/AnimeList.js @@ -83,14 +83,15 @@ class AnimeList extends PureComponent { const { hasMorePage, isRefreshing, url, page, data } = this.state; if (!hasMorePage && !isRefreshing) return; let loader = new AnimeLoader(url, page); - loader.loadAnime().then((animeData) => { - if (animeData.length == 0) { + loader.loadAnime().then(([animeData, count]) => { + console.log(count); + if (count == 0) { // No more pages this.setState({ hasMorePage: false, isRefreshing: false, }) - } else if (animeData.length < 20 && !global.hideDub) { + } else if (count < 20) { // Append data this.setState({ data: data.concat(animeData), diff --git a/AnimeGo/src/component/list/EpisodeList.js b/AnimeGo/src/component/list/EpisodeList.js index 66947e8..5ec3d00 100755 --- a/AnimeGo/src/component/list/EpisodeList.js +++ b/AnimeGo/src/component/list/EpisodeList.js @@ -1,12 +1,12 @@ import React, { Component } from 'react'; -import { View, Text, FlatList, Image, Linking, Button } from 'react-native'; +import { View, Text, FlatList, Image, Linking, Button, AsyncStorage, ToastAndroid, Platform, Alert } from 'react-native'; import EpisodeLoader from '../../helper/core/EpisodeLoader'; import EpisodeCell from '../cell/EpisodeCell'; import { LoadingIndicator } from '../../component'; import { Actions } from 'react-native-router-flux'; import { isPortrait } from '../../helper/DeviceDimensions'; import { styles } from './EpisodeListStyles' -import { BlueColour, GreenColour } from '../../value'; +import { BlueColour, GreenColour, RedColour } from '../../value'; class EpisodeList extends React.PureComponent { constructor(props) { @@ -44,7 +44,7 @@ class EpisodeList extends React.PureComponent { renderHeader = () => { const { name, image, plot } = this.state; - const { mainViewStyle, titleStyle, basicTextStyle, plotStyle} = styles; + const { mainViewStyle, titleStyle, basicTextStyle, plotStyle } = styles; return ( {name} @@ -52,15 +52,44 @@ class EpisodeList extends React.PureComponent { {plot}