diff --git a/AnimeGo/src/component/cell/AnimeCell.js b/AnimeGo/src/component/cell/AnimeCell.js index d95dde4..828c772 100644 --- a/AnimeGo/src/component/cell/AnimeCell.js +++ b/AnimeGo/src/component/cell/AnimeCell.js @@ -45,13 +45,13 @@ class AnimeCell extends PureComponent { buttonPressed = () => { if (this.data.link.includes('-episode-')) { // Only NewRelease redirects you to that new episode - Actions.WatchAnime({title: this.title, link: this.data.link, fromInfo: false, headerTintColor: 'white'}); + Actions.WatchAnime({title: this.title, link: this.data.link, fromInfo: false}); } else if (this.data.link == 'Error') { // No anime found go back Linking.openURL('https://www.google.com/search?q=' + this.data.name + ' gogoanime'); } else { // AnimeDetail will be shown here - Actions.AnimeDetail({title: 'Loading...', link: this.data.link, headerTintColor: 'white'}) + Actions.AnimeDetail({title: 'Loading...', link: this.data.link}) } } } diff --git a/AnimeGo/src/component/list/SourceList.js b/AnimeGo/src/component/list/SourceList.js index ffa2e5f..8e42d7f 100755 --- a/AnimeGo/src/component/list/SourceList.js +++ b/AnimeGo/src/component/list/SourceList.js @@ -1,10 +1,10 @@ import React, { Component } from 'react'; -import { View, Text, Button, FlatList, Dimensions } from 'react-native'; +import { View, Text, Button, FlatList, Dimensions, Alert } from 'react-native'; import AnimeSourceLoader from '../../helper/core/AnimeSourceLoader'; import SourceCell from '../cell/SourceCell'; import { LoadingIndicator } from '../../component'; import { Actions } from 'react-native-router-flux'; -import { SecondaryColour, RedColour, GreenColour } from '../../value'; +import { SecondaryColour, RedColour, GreenColour, AnimeGoColour } from '../../value'; import { styles } from './SourceListStyles'; class SourceList extends Component { @@ -16,18 +16,19 @@ class SourceList extends Component { this.state = { data: [], name: '', link: '', + prev: '', next: '' } } componentWillMount() { let source = new AnimeSourceLoader(this.props.link); - source.loadSource().then((animeSource) => { - // console.log(animeSource); + source.loadSource().then(([animeSource, prev, next]) => { if (animeSource.length == 0) return; this.setState({ data: animeSource, name: animeSource[1].animeName, link: animeSource[1].infoLink, + prev: prev, next: next }) }) .catch((error) => { @@ -42,7 +43,7 @@ class SourceList extends Component { return ( } /> + data={data} renderItem={({item}) => }/> ) } @@ -53,14 +54,40 @@ class SourceList extends Component { } renderHeader = () => { - const { headerViewStyle, textStyle } = styles; + const { headerViewStyle, textStyle, buttonGroupStyle, buttonStyle } = styles; return ( Anime Detail