mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
read display-name from the database, not from the application-preference
This commit is contained in:
@@ -267,9 +267,8 @@ public class CreateProfileActivity extends BaseActionBarActivity {
|
||||
}
|
||||
|
||||
private void initializeProfileName(boolean excludeSystem) {
|
||||
if (!TextUtils.isEmpty(Prefs.getProfileName(this))) {
|
||||
String profileName = Prefs.getProfileName(this);
|
||||
|
||||
String profileName = DcHelper.get(this, DcHelper.CONFIG_DISPLAY_NAME);
|
||||
if (!TextUtils.isEmpty(profileName)) {
|
||||
name.setText(profileName);
|
||||
name.setSelection(profileName.length(), profileName.length());
|
||||
} else if (!excludeSystem) {
|
||||
@@ -430,7 +429,6 @@ public class CreateProfileActivity extends BaseActionBarActivity {
|
||||
Context context = CreateProfileActivity.this;
|
||||
DcHelper.set(context, DcHelper.CONFIG_DISPLAY_NAME, name);
|
||||
setStatusText();
|
||||
Prefs.setProfileName(context, name);
|
||||
|
||||
try {
|
||||
AvatarHelper.setSelfAvatar(CreateProfileActivity.this, DcHelper.get(context, DcHelper.CONFIG_ADDRESS), avatarBytes);
|
||||
|
||||
@@ -57,7 +57,6 @@ public class Prefs {
|
||||
|
||||
public static final String SYSTEM_EMOJI_PREF = "pref_system_emoji";
|
||||
public static final String DIRECT_CAPTURE_CAMERA_ID = "pref_direct_capture_camera_id";
|
||||
private static final String PROFILE_NAME_PREF = "pref_profile_name";
|
||||
private static final String PROFILE_AVATAR_ID_PREF = "pref_profile_avatar_id";
|
||||
public static final String INCOGNITO_KEYBORAD_PREF = "pref_incognito_keyboard";
|
||||
|
||||
@@ -122,14 +121,6 @@ public class Prefs {
|
||||
return getBooleanPreference(context, INCOGNITO_KEYBORAD_PREF, false);
|
||||
}
|
||||
|
||||
public static void setProfileName(Context context, String name) {
|
||||
setStringPreference(context, PROFILE_NAME_PREF, name);
|
||||
}
|
||||
|
||||
public static String getProfileName(Context context) {
|
||||
return getStringPreference(context, PROFILE_NAME_PREF, null);
|
||||
}
|
||||
|
||||
public static void setProfileAvatarId(Context context, int id) {
|
||||
setIntegerPrefrence(context, PROFILE_AVATAR_ID_PREF, id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user