diff --git a/WordPress/src/main/java/org/wordpress/android/ui/prefs/MyProfileFragment.java b/WordPress/src/main/java/org/wordpress/android/ui/prefs/MyProfileFragment.java index ac4654cbd53e..01ded25760d5 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/prefs/MyProfileFragment.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/prefs/MyProfileFragment.java @@ -40,6 +40,8 @@ public class MyProfileFragment extends Fragment implements TextInputDialogFragme private WPTextView mDisplayName; private WPTextView mAboutMe; private Button mLearMoreAtGravatar; + private Button mGravatarSyncButton; + private View mGravatarSyncContainer; @Inject Dispatcher mDispatcher; @Inject AccountStore mAccountStore; @@ -90,6 +92,8 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa mDisplayName = rootView.findViewById(R.id.display_name); mAboutMe = rootView.findViewById(R.id.about_me); mLearMoreAtGravatar = rootView.findViewById(R.id.learn_more_at_gravatar); + mGravatarSyncButton = rootView.findViewById(R.id.gravatar_sync_button); + mGravatarSyncContainer = rootView.findViewById(R.id.gravatar_sync_container); rootView.findViewById(R.id.first_name_row).setOnClickListener( createOnClickListener( @@ -116,6 +120,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa mAboutMe, true)); mLearMoreAtGravatar.setOnClickListener(v -> ActivityLauncher.openUrlExternal(getActivity(), GRAVATAR_URL)); + mGravatarSyncButton.setOnClickListener(v -> mGravatarSyncContainer.setVisibility(View.GONE)); return rootView; } @@ -180,6 +185,7 @@ private void updateMyProfileForLabel(TextView textView) { payload.params.put(restParamForTextView(textView), textView.getText().toString()); mDispatcher.dispatch(AccountActionBuilder.newPushSettingsAction(payload)); trackSettingsDidChange(restParamForTextView(textView)); + mGravatarSyncContainer.setVisibility(View.VISIBLE); } private void trackSettingsDidChange(String fieldName) { diff --git a/WordPress/src/main/res/layout/my_profile_fragment.xml b/WordPress/src/main/res/layout/my_profile_fragment.xml index c9a1955f8264..e9f62391db70 100644 --- a/WordPress/src/main/res/layout/my_profile_fragment.xml +++ b/WordPress/src/main/res/layout/my_profile_fragment.xml @@ -1,8 +1,10 @@ + android:layout_height="match_parent" + android:animateLayoutChanges="true"> @@ -132,4 +135,45 @@ app:icon="@drawable/ic_external_white_24dp" /> + + + + + + + + diff --git a/WordPress/src/main/res/values/strings.xml b/WordPress/src/main/res/values/strings.xml index f3887828dd20..94489959c095 100644 --- a/WordPress/src/main/res/values/strings.xml +++ b/WordPress/src/main/res/values/strings.xml @@ -2871,6 +2871,8 @@ Checking purchases "Gravatar keeps your profile information safe and up to date, automatically syncing any updates made here with your Gravatar profile." Learn more on Gravatar.com + Updates might take some time to sync with your Gravatar profile. + Done Account Settings