-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New ToWatch list NewSeason will be correct AnimeList could work with hide DUB mode on Former-commit-id: 420a3aa
- Loading branch information
Showing
12 changed files
with
179 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
global.dataSaver = false; | ||
global.hideDub = false; | ||
global.currSubCategory = ''; | ||
global.currSubCategory = ''; | ||
global.favList = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import React, { Component } from 'react'; | ||
import { View, FlatList, Text, AsyncStorage, Button, ToastAndroid, Platform } from 'react-native'; | ||
import { SmartTouchable } from '../component'; | ||
import { styles } from './ToWatchStyles'; | ||
import { Actions } from 'react-native-router-flux'; | ||
import { RedColour } from '../value'; | ||
|
||
class ToWatch extends Component { | ||
constructor() { | ||
super() | ||
this.state = { | ||
data: Object.assign(global.favList) | ||
} | ||
} | ||
|
||
listKey = (item) => item.name; | ||
render() { | ||
const { btnViewStyle, mainViewStyle, listStyle, textStyle } = styles; | ||
return ( | ||
<View style={mainViewStyle}> | ||
<Button title='Remove all anime' color={RedColour} onPress={this.removeAllAnime}/> | ||
<FlatList style={listStyle} data={this.state.data} keyExtractor={this.listKey} renderItem={({item}) => { | ||
return ( | ||
<SmartTouchable onPress={() => this.showAnimeDetail(item.link)}> | ||
<View style={btnViewStyle}> | ||
<Text style={textStyle} numberOfLines={2}>{item.name}</Text> | ||
</View> | ||
</SmartTouchable> | ||
) | ||
}} automaticallyAdjustContentInsets={false}/> | ||
</View> | ||
); | ||
} | ||
|
||
/** | ||
* Remove all anime from ToWatch list | ||
*/ | ||
removeAllAnime = () => { | ||
this.setState({data: []}); | ||
global.favList = []; | ||
if (Platform.OS == 'android') ToastAndroid.show('All anime has been removed', ToastAndroid.SHORT); | ||
AsyncStorage.setItem('@Favourite', JSON.stringify([])); | ||
} | ||
|
||
/** | ||
* Visit AnimeDetail page | ||
*/ | ||
showAnimeDetail(link) { | ||
Actions.AnimeDetail({title: 'Loading...', link: link}); | ||
} | ||
|
||
} | ||
|
||
export {ToWatch}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { StyleSheet } from 'react-native'; | ||
|
||
export const styles = StyleSheet.create({ | ||
mainViewStyle: { | ||
paddingTop: 6, | ||
flex: 1 | ||
}, | ||
listStyle: { | ||
margin: 4, | ||
marginTop: 8 | ||
}, | ||
btnViewStyle: { | ||
marginTop: 4, | ||
height: 44, | ||
justifyContent: 'center' | ||
}, | ||
textStyle: { | ||
fontWeight: 'bold', | ||
color: 'black' | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters