reword self-name/-avatar hint; name is required

This commit is contained in:
B. Petersen
2024-01-08 22:07:54 +01:00
committed by bjoern
parent c0c519870b
commit c920ced553
2 changed files with 8 additions and 5 deletions
+2
View File
@@ -906,6 +906,8 @@
<string name="qraccount_ask_create_and_login">Create new e-mail address on \"%1$s\" and log in there?</string>
<string name="qraccount_ask_create_and_login_another">Create new e-mail address on \"%1$s\" and log in there?\n\nYour existing account will not be deleted. Use the \"Switch Account\" item to switch between your accounts.</string>
<string name="qraccount_success_enter_name">Login successful—your e-mail address is %1$s\n\nIf you like, you can now enter a name and an profile image that will be displayed to people you write to.</string>
<string name="set_name_and_avatar_explain">Set a name for your new account that your contacts will recognize. You can also set a profile image.</string>
<string name="please_enter_name">Please enter a name.</string>
<string name="qraccount_qr_code_cannot_be_used">The scanned QR code cannot be used to set up a new account.</string>
<string name="qraccount_use_on_new_install">The scanned QR code is for setting up a new account. You can scan the QR code when setting up a new Delta Chat installation.</string>
<!-- the placeholder will be replaced by the e-mail address of the account -->
@@ -226,7 +226,7 @@ public class CreateProfileActivity extends BaseActionBarActivity implements Emoj
if (fromWelcome) {
String addr = DcHelper.get(this, "addr");
loginSuccessText.setText(getString(R.string.qraccount_success_enter_name, addr));
loginSuccessText.setText(R.string.set_name_and_avatar_explain);
ViewUtil.findById(this, R.id.status_text_layout).setVisibility(View.GONE);
ViewUtil.findById(this, R.id.information_label).setVisibility(View.GONE);
passwordAccountSettings.setVisibility(View.GONE);
@@ -294,10 +294,11 @@ public class CreateProfileActivity extends BaseActionBarActivity implements Emoj
}
private void handleUpload() {
final String name;
if (TextUtils.isEmpty(this.name.getText().toString())) name = null;
else name = this.name.getText().toString();
if (TextUtils.isEmpty(this.name.getText())) {
Toast.makeText(this, R.string.please_enter_name, Toast.LENGTH_LONG).show();
return;
}
final String name = this.name.getText().toString();
new AsyncTask<Void, Void, Boolean>() {
@Override