Skip to content

Commit

Permalink
Merge pull request #49 from sampocs/pochyly
Browse files Browse the repository at this point in the history
disabled emoji and resolved period issue
  • Loading branch information
sampocs authored Apr 26, 2019
2 parents 09eafe1 + 8044e9e commit 2ff6991
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
8 changes: 5 additions & 3 deletions screens/AddHabitScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ class AddHabitScreen extends React.Component {
habitSettings.type = Constants.PROGRESS
habitSettings.habitInfo = {
unit: this.state.unit,
goal: parseInt(this.state.goal)
goal: this.state.goal === '.' ? 0 : parseInt(this.state.goal)
}

habitHistory.type = Constants.PROGRESS
habitHistory.habitInfo = {
progress: 0,
goal: parseInt(this.state.goal)
goal: this.state.goal === '.' ? 0 : parseInt(this.state.goal)
}
}
else if (this.state.includeSubtasksChecked) {
Expand Down Expand Up @@ -180,7 +180,7 @@ class AddHabitScreen extends React.Component {
}
return false
}
if (this.state.includeMeasurementsChecked && this.state.goal === '') {
if (this.state.includeMeasurementsChecked && (this.state.goal === '' || this.state.goal === '.')) {
if (alertUser) {
AlertIOS.alert(
'',
Expand Down Expand Up @@ -244,6 +244,7 @@ class AddHabitScreen extends React.Component {
}}
returnKeyType={'done'}
selectTextOnFocus={true}
keyboardType={'ascii-capable'}
value={this.state.habitName}
/>
</View>
Expand Down Expand Up @@ -361,6 +362,7 @@ class AddHabitScreen extends React.Component {
autoCapitalize={'none'}
selectTextOnFocus={true}
value={this.state.unit}
keyboardType={'ascii-capable'}
editable={this.state.includeMeasurementsChecked}
/>
</View>
Expand Down
8 changes: 5 additions & 3 deletions screens/EditHabitScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ class EditHabitScreen extends React.Component {
habitSettings.type = Constants.PROGRESS
habitSettings.habitInfo = {
unit: this.state.unit,
goal: parseInt(this.state.goal)
goal: this.state.goal === '.' ? 0 : parseInt(this.state.goal)
}

habitHistory.type = Constants.PROGRESS
habitHistory.habitInfo = {
progress: 0,
goal: parseInt(this.state.goal)
goal: this.state.goal === '.' ? 0 : parseInt(this.state.goal)
}
}
else if (this.state.includeSubtasksChecked) {
Expand Down Expand Up @@ -187,7 +187,7 @@ class EditHabitScreen extends React.Component {
}
return false
}
if (this.state.includeMeasurementsChecked && this.state.goal === '') {
if (this.state.includeMeasurementsChecked && (this.state.goal === '' || this.state.goal === '.')) {
if (alertUser) {
AlertIOS.alert(
'',
Expand Down Expand Up @@ -239,6 +239,7 @@ class EditHabitScreen extends React.Component {
}}
returnKeyType={'done'}
selectTextOnFocus={true}
keyboardType={'ascii-capable'}
value={this.state.habitName}
editable={false}
/>
Expand Down Expand Up @@ -341,6 +342,7 @@ class EditHabitScreen extends React.Component {
autoCapitalize={'none'}
selectTextOnFocus={true}
value={this.state.unit}
keyboardType={'ascii-capable'}
editable={this.state.includeMeasurementsChecked}
/>
</View>
Expand Down
1 change: 1 addition & 0 deletions screens/LoginScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ class LoginScreen extends React.Component {
style={styles.textInput}
placeholder="Email"
textContentType="emailAddress"
keyboardType={'ascii-capable'}
autoCapitalize="none"
autoCorrect={false}
returnKeyType="next"
Expand Down
1 change: 1 addition & 0 deletions screens/SignUpScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ class SignUpScreen extends React.Component {
style={styles.textInput}
placeholder="Email"
textContentType="emailAddress"
keyboardType={'ascii-capable'}
autoCapitalize="none"
autoCorrect={false}
keyboardType="email-address"
Expand Down

0 comments on commit 2ff6991

Please sign in to comment.