diff --git a/res/drawable/icon_seedling.xml b/res/drawable/icon_seedling.xml new file mode 100644 index 0000000000..820b0b2617 --- /dev/null +++ b/res/drawable/icon_seedling.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/res/drawable/icon_share.xml b/res/drawable/icon_share.xml new file mode 100644 index 0000000000..afa355e8e2 --- /dev/null +++ b/res/drawable/icon_share.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index 5eeb3568f7..6dd209dc70 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -35,10 +35,10 @@ + android:icon="@drawable/icon_share"/> + android:icon="@drawable/icon_seedling"/> diff --git a/src/org/thoughtcrime/securesms/preferences/widgets/ProfilePreference.java b/src/org/thoughtcrime/securesms/preferences/widgets/ProfilePreference.java index e2afb38192..5c56ef6d49 100644 --- a/src/org/thoughtcrime/securesms/preferences/widgets/ProfilePreference.java +++ b/src/org/thoughtcrime/securesms/preferences/widgets/ProfilePreference.java @@ -8,6 +8,7 @@ import android.support.v7.preference.Preference; import android.support.v7.preference.PreferenceViewHolder; import android.text.TextUtils; import android.util.AttributeSet; +import android.view.View; import android.widget.ImageView; import android.widget.TextView; @@ -78,6 +79,8 @@ public class ProfilePreference extends Preference { profileNameView.setText(profileName); } + profileNameView.setVisibility(TextUtils.isEmpty(profileName) ? View.GONE : View.VISIBLE); + profileNumberView.setText(localAddress.toPhoneString()); } }