mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
@@ -106,13 +106,13 @@ public class ConversationTitleView extends RelativeLayout {
|
||||
}
|
||||
else {
|
||||
DcContact dcContact = dcContext.getContact(chatContacts[0]);
|
||||
subtitleStr = dcContact.getAddr();
|
||||
if (profileView || !dcChat.isProtected()) {
|
||||
subtitleStr = dcContact.getAddr();
|
||||
}
|
||||
isOnline = dcContact.wasSeenRecently();
|
||||
}
|
||||
}
|
||||
|
||||
subtitle.setText(subtitleStr);
|
||||
|
||||
avatar.setAvatar(glideRequests, new Recipient(getContext(), dcChat), false);
|
||||
avatar.setSeenRecently(isOnline);
|
||||
title.setCompoundDrawablesWithIntrinsicBounds(imgLeft, 0, imgRight, 0);
|
||||
|
||||
@@ -110,7 +110,7 @@ public class CreateProfileActivity extends BaseActionBarActivity implements Emoj
|
||||
onBackPressed();
|
||||
return true;
|
||||
case R.id.menu_create_profile:
|
||||
handleUpload();
|
||||
updateProfile();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -122,8 +122,7 @@ public class CreateProfileActivity extends BaseActionBarActivity implements Emoj
|
||||
if (container.isInputOpen()) {
|
||||
container.hideCurrentInput(name);
|
||||
} else if (fromWelcome) {
|
||||
startActivity(new Intent(getApplicationContext(), ConversationListActivity.class));
|
||||
finish();
|
||||
updateProfile();
|
||||
} else {
|
||||
super.onBackPressed();
|
||||
}
|
||||
@@ -227,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,11 +293,12 @@ public class CreateProfileActivity extends BaseActionBarActivity implements Emoj
|
||||
statusView.setText(status);
|
||||
}
|
||||
|
||||
private void handleUpload() {
|
||||
final String name;
|
||||
|
||||
if (TextUtils.isEmpty(this.name.getText().toString())) name = null;
|
||||
else name = this.name.getText().toString();
|
||||
private void updateProfile() {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user