Skip to content

Commit

Permalink
added vibration as warning on empty description
Browse files Browse the repository at this point in the history
  • Loading branch information
AlMel3000 committed Jul 19, 2018
1 parent a595f49 commit 033deda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.VIBRATE"/>

<application
android:name=".MainApplication"
Expand Down
6 changes: 4 additions & 2 deletions app/views/screens/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import {
Text,
TextInput,
TouchableOpacity,
View
View,
Vibration
} from 'react-native';

import React, {Component} from 'react';
Expand Down Expand Up @@ -239,7 +240,8 @@ class Main extends Component {
if (this.state.description.trim().length < 2) {
this.setState({
descriptionBorderColor: 'red'
})
});
Vibration.vibrate();
} else {

let mailBody;
Expand Down

0 comments on commit 033deda

Please sign in to comment.