Skip to content

Commit

Permalink
completed all major functionalities
Browse files Browse the repository at this point in the history
  • Loading branch information
Hemant27031999 committed Dec 20, 2019
1 parent bf91136 commit e99b687
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 188 deletions.
8 changes: 1 addition & 7 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,7 @@ const DrawerNavigatorExample = createDrawerNavigator({
navigationOptions: {
drawerLabel: 'Friend Request',
},
},
// SignIn: {
// screen: SignIn,
// navigationOptions: {
// drawerLabel: 'LogOut',
// },
// }
}
},
{
contentComponent: drawerContentComponents
Expand Down
5 changes: 3 additions & 2 deletions app/components/MainScreen/AllUsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,16 @@ searchFriends = (e) => {
render() {
return (
<View style={{flex: 1, width: '100%', backgroundColor: '#261a0d'}}>
<Text style={{fontSize: 60, fontWeight: 'bold', marginTop:20, color: '#261a0d', textAlign: 'center', backgroundColor:'#b59d96', borderRadius: 20, width: '98%'}}>All Users</Text>
{this.state.usersList.length === 0?

<View style={{paddingHorizontal: 50, paddingTop: 100}}>
<Text style={{fontSize: 50, fontWeight: 'bold', color: '#ecd9c6', textAlign: 'center'}}>No user found</Text>
</View>:

<View style={{paddingTop: 28, width:'100%', paddingBottom: 60}}>
<View style={{width:'100%', paddingBottom: 60}}>
<TextInput
style={{ borderColor: '#686C68', width: '97%', paddingHorizontal: 20, marginHorizontal: 5, marginVertical: 5, height: 50, borderWidth: 1, borderRadius: 30, color: '#d6d6c2', fontSize: 20}}
style={{ borderColor: '#686C68', width: '98%', paddingHorizontal: 20, marginHorizontal: 3, marginVertical: 5, height: 50, borderWidth: 1, borderRadius: 30, color: '#d6d6c2', fontSize: 20}}
placeholder = 'search a friend'
ref={input => { this.textInput = input }}
onChangeText={(text) => this.searchFriends(text)}
Expand Down
121 changes: 0 additions & 121 deletions app/components/MainScreen/ChatScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,127 +10,6 @@ import {createAppContainer} from 'react-navigation';
import Pusher from 'pusher-js/react-native';
import Toast, {DURATION} from 'react-native-easy-toast';

const data = [
{
imageUrl: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQd_nySYgvYJrWrRbDDBoo1izr89qHXzS_GujLRyi2JcrDv3QVmrQ&s",
title: "Ishan"
},
{
imageUrl: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQd_nySYgvYJrWrRbDDBoo1izr89qHXzS_GujLRyi2JcrDv3QVmrQ&s",
title: "Hemil"
},
{
imageUrl: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQd_nySYgvYJrWrRbDDBoo1izr89qHXzS_GujLRyi2JcrDv3QVmrQ&s",
title: "Patil"
},
{
imageUrl: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQd_nySYgvYJrWrRbDDBoo1izr89qHXzS_GujLRyi2JcrDv3QVmrQ&s",
title: "Ashish"
},
{
imageUrl: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQd_nySYgvYJrWrRbDDBoo1izr89qHXzS_GujLRyi2JcrDv3QVmrQ&s",
title: "Piyush"
},
{
imageUrl: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQd_nySYgvYJrWrRbDDBoo1izr89qHXzS_GujLRyi2JcrDv3QVmrQ&s",
title: "Bhavya"
},
{
imageUrl: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQd_nySYgvYJrWrRbDDBoo1izr89qHXzS_GujLRyi2JcrDv3QVmrQ&s",
title: "Alfez"
},
{
imageUrl: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQd_nySYgvYJrWrRbDDBoo1izr89qHXzS_GujLRyi2JcrDv3QVmrQ&s",
title: "Shrey"
},
{
imageUrl: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQd_nySYgvYJrWrRbDDBoo1izr89qHXzS_GujLRyi2JcrDv3QVmrQ&s",
title: "Aradhna"
}
];

const messages = [
{
message: "Hello How are you ?",
name: "Piyush"
},
{
message: "I'm fine, what about you ?",
name: "Ashish"
},
{
message: "Oh I am also fine, where are you now a days ....",
name: "Piyush"
},
{
message: "Bro I am pursuing B.Tech from IIt Roorkee.",
name: "Ashish"
},
{
message: "That's nice ...... when are you coming home ?",
name: "Piyush"
},
{
message: "Hello How are you ?",
name: "Piyush"
},
{
message: "I'm fine, what about you ?",
name: "Ashish"
},
{
message: "Oh I am also fine, where are you now a days ....",
name: "Piyush"
},
{
message: "Bro I am pursuing B.Tech from IIt Roorkee.",
name: "Ashish"
},
{
message: "That's nice ...... when are you coming home ?",
name: "Piyush"
},
{
message: "Hello How are you ?",
name: "Piyush"
},
{
message: "I'm fine, what about you ?",
name: "Ashish"
},
{
message: "Oh I am also fine, where are you now a days ....",
name: "Piyush"
},
{
message: "Bro I am pursuing B.Tech from IIt Roorkee.",
name: "Ashish"
},
{
message: "That's nice ...... when are you coming home ?",
name: "Piyush"
},
{
message: "Hello How are you ?",
name: "Piyush"
},
{
message: "I'm fine, what about you ?",
name: "Ashish"
},
{
message: "Oh I am also fine, where are you now a days ....",
name: "Piyush"
},
{
message: "Bro I am pursuing B.Tech from IIt Roorkee.",
name: "Ashish"
},
{
message: "That's nice ...... when are you coming home ?",
name: "Piyush"
}
];

export default class ChatScreen extends Component {

Expand Down
5 changes: 3 additions & 2 deletions app/components/MainScreen/FriendRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,14 @@ onClickListener(viewId) {
render() {
return (
<View style={{flex: 1, width: '100%', backgroundColor: '#261a0d'}}>
{this.state.rqstlist.length === 0?
<Text style={{fontSize: 60, fontWeight: 'bold', marginTop:20, color: '#261a0d', textAlign: 'center', backgroundColor:'#b59d96', borderRadius: 20, width: '98%'}}>Requests</Text>

{this.state.rqstlist.length === 0?
<View style={{paddingHorizontal: 50, paddingTop: 100}}>
<Text style={{fontSize: 50, fontWeight: 'bold', color: '#ecd9c6', textAlign: 'center'}}>No friend request pending</Text>
</View>:

<View style={{paddingTop: 28, width:'100%', paddingBottom: 60}}>
<View style={{paddingTop: 5, width:'100%', paddingBottom: 60}}>
<FlatList
data={this.state.rqstlist}
style={{height: '100%', width: '100%'}}
Expand Down
8 changes: 1 addition & 7 deletions app/components/SignIn.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ import {Fumi} from 'react-native-textinput-effects';
import * as Font from 'expo-font';
import Toast, {DURATION} from 'react-native-easy-toast';
import { StackActions, NavigationActions } from 'react-navigation';

const resetAction = StackActions.reset({
index: 0,
actions: [NavigationActions.navigate({ routeName: 'DrawerNavigatorExample' })],
});
import {ColorDotsLoader, CirclesRotationScaleLoader} from 'react-native-indicator';

export default class SignIn extends Component {

Expand All @@ -24,8 +20,6 @@ export default class SignIn extends Component {
email : '',
password: '',
}

// this.props.navigation.dispatch(resetAction);
}

onClickListener = (viewId) => {
Expand Down
4 changes: 2 additions & 2 deletions app/components/drawerContentComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export default class drawerContentComponents extends Component {
return (
<View style={styles.container}>
<View style={styles.headerContainer}>
<Image style={{width: 170, height: 170, justifyContent: 'center', borderWidth: 1, borderColor: '#000000', borderRadius: 80}} source={require('./MainScreen/profile.jpeg')} />
<Text style={styles.headerText}>Prathamesh Katkar</Text>
<Image style={{width: 170, height: 170, justifyContent: 'center', borderWidth: 1, borderColor: '#000000', borderRadius: 80}} source={{uri: this.props.navigation.getParam('data', "imageURL").imageurl}} />
<Text style={styles.headerText}>{this.props.navigation.getParam('data', "name").name}</Text>
</View>
<View style={styles.screenContainer}>
<TouchableHighlight style={[styles.screenStyle, (this.props.activeItemKey=='ChatScreen') ? styles.activeBackgroundColor : null]} onPress={this.navigateToScreen('ChatScreen')}>
Expand Down
Loading

0 comments on commit e99b687

Please sign in to comment.