Skip to content

Commit 3b2e94f

Browse files
committed
Merge pull request #25 from HTChang/type
Toast should respect to the isParseLoginEmailAsUsername flag to avoid confusion
2 parents af5a723 + c9dfe6a commit 3b2e94f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

ParseLoginUI/src/com/parse/ui/ParseLoginFragment.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,11 @@ public void onClick(View v) {
166166
String password = passwordField.getText().toString();
167167

168168
if (username.length() == 0) {
169-
showToast(R.string.com_parse_ui_no_username_toast);
169+
if (config.isParseLoginEmailAsUsername()) {
170+
showToast(R.string.com_parse_ui_no_email_toast);
171+
} else {
172+
showToast(R.string.com_parse_ui_no_username_toast);
173+
}
170174
} else if (password.length() == 0) {
171175
showToast(R.string.com_parse_ui_no_password_toast);
172176
} else {

ParseLoginUI/src/com/parse/ui/ParseSignupFragment.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,11 @@ public void onClick(View v) {
153153
}
154154

155155
if (username.length() == 0) {
156-
showToast(R.string.com_parse_ui_no_username_toast);
156+
if (config.isParseLoginEmailAsUsername()) {
157+
showToast(R.string.com_parse_ui_no_email_toast);
158+
} else {
159+
showToast(R.string.com_parse_ui_no_username_toast);
160+
}
157161
} else if (password.length() == 0) {
158162
showToast(R.string.com_parse_ui_no_password_toast);
159163
} else if (password.length() < minPasswordLength) {

0 commit comments

Comments
 (0)