From fd632d29a2ae8f1b2cf2151a720a66090545d833 Mon Sep 17 00:00:00 2001 From: Tony Rankin Date: Wed, 6 Jan 2016 14:22:22 -0800 Subject: [PATCH 1/8] Adding back image width setting under new This Device category --- .../ui/prefs/SiteSettingsFragment.java | 37 ++++++++++++++ WordPress/src/main/res/values/strings.xml | 51 +++++++++++++++++++ WordPress/src/main/res/xml/site_settings.xml | 29 ++++++++--- 3 files changed, 110 insertions(+), 7 deletions(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsFragment.java b/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsFragment.java index d5284d2795af..e0b695c9720b 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsFragment.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsFragment.java @@ -155,6 +155,9 @@ public class SiteSettingsFragment extends PreferenceFragment private Preference mModerationHoldPref; private Preference mBlacklistPref; + // This Device settings + private DetailListPreference mImageWidthPref; + // Delete site option (NOTE: only for WP.org) private Preference mDeleteSitePref; @@ -178,6 +181,9 @@ public void onCreate(Bundle savedInstanceState) { // setup state to fetch remote settings mShouldFetch = true; + // disable editing until remote data is fetched + allowEditing(false); + // initialize the appropriate settings interface (WP.com or WP.org) mSiteSettings = SiteSettingsInterface.getInterface(activity, mBlog, this); @@ -428,6 +434,11 @@ public boolean onPreferenceChange(Preference preference, Object newValue) { setDetailListPreferenceValue(mFormatPref, newValue.toString(), mSiteSettings.getDefaultPostFormatDisplay()); + } else if (preference == mImageWidthPref) { + mBlog.setMaxImageWidth(newValue.toString()); + setDetailListPreferenceValue(mImageWidthPref, + mBlog.getMaxImageWidth(), + mBlog.getMaxImageWidth()); } else { return false; } @@ -501,10 +512,32 @@ public void onCredentialsValidated(Exception error) { public void allowEditing(boolean allow) { // Address won't be editable until the app supports domain name changes if (mAddressPref != null) mAddressPref.setEnabled(false); + if (mTitlePref != null) mTitlePref.setEnabled(allow); if (mTaglinePref != null) mTaglinePref.setEnabled(allow); if (mPrivacyPref != null) mPrivacyPref.setEnabled(allow); if (mLanguagePref != null) mLanguagePref.setEnabled(allow); + if (mLocationPref != null) mLocationPref.setEnabled(allow); + if (mCategoryPref != null) mCategoryPref.setEnabled(allow); + if (mFormatPref != null) mFormatPref.setEnabled(allow); + if (mAllowCommentsPref != null) mAllowCommentsPref.setEnabled(allow); + if (mAllowCommentsNested != null) mAllowCommentsNested.setEnabled(allow); + if (mSendPingbacksPref != null) mSendPingbacksPref.setEnabled(allow); + if (mSendPingbacksNested != null) mSendPingbacksNested.setEnabled(allow); + if (mReceivePingbacksPref != null) mReceivePingbacksPref.setEnabled(allow); + if (mReceivePingbacksNested != null) mReceivePingbacksNested.setEnabled(allow); + if (mIdentityRequiredPreference != null) mIdentityRequiredPreference.setEnabled(allow); + if (mUserAccountRequiredPref != null) mUserAccountRequiredPref.setEnabled(allow); + if (mCloseAfterPref != null) mCloseAfterPref.setEnabled(allow); + if (mSortByPref != null) mSortByPref.setEnabled(allow); + if (mThreadingPref != null) mThreadingPref.setEnabled(allow); + if (mPagingPref != null) mPagingPref.setEnabled(allow); + if (mWhitelistPref != null) mWhitelistPref.setEnabled(allow); + if (mMultipleLinksPref != null) mMultipleLinksPref.setEnabled(allow); + if (mModerationHoldPref != null) mModerationHoldPref.setEnabled(allow); + if (mBlacklistPref != null) mBlacklistPref.setEnabled(allow); + if (mRelatedPostsPref != null) mRelatedPostsPref.setEnabled(allow); + if (mDeleteSitePref != null) mDeleteSitePref.setEnabled(allow); } private void setupPreferenceList(ListView prefList, Resources res) { @@ -555,6 +588,7 @@ private void initPreferences() { mMultipleLinksPref = getClickPref(R.string.pref_key_site_multiple_links); mModerationHoldPref = getClickPref(R.string.pref_key_site_moderation_hold); mBlacklistPref = getClickPref(R.string.pref_key_site_blacklist); + mImageWidthPref = (DetailListPreference) getChangePref(R.string.pref_key_site_image_width); mDeleteSitePref = getClickPref(R.string.pref_key_site_delete_site); // .com sites hide the Account category, self-hosted sites hide the Related Posts preference @@ -633,6 +667,9 @@ private void setPreferencesFromSiteSettings() { setDetailListPreferenceValue(mPrivacyPref, String.valueOf(mSiteSettings.getPrivacy()), mSiteSettings.getPrivacyDescription()); + setDetailListPreferenceValue(mImageWidthPref, + mBlog.getMaxImageWidth(), + mBlog.getMaxImageWidth()); setCategories(); setPostFormats(); setAllowComments(mSiteSettings.getAllowComments()); diff --git a/WordPress/src/main/res/values/strings.xml b/WordPress/src/main/res/values/strings.xml index 30815bd27ac6..99e91d8e3bb3 100644 --- a/WordPress/src/main/res/values/strings.xml +++ b/WordPress/src/main/res/values/strings.xml @@ -441,6 +441,8 @@ wp_pref_site_location wp_pref_site_default_category wp_pref_site_default_format + wp_pref_site_default_this_device + wp_pref_site_default_image_width wp_pref_site_discussion wp_pref_site_allow_comments wp_pref_site_allow_comments_nested @@ -491,6 +493,7 @@ @string/discussion Defaults for New Posts @string/comments + This Device Site Title @@ -503,6 +506,7 @@ Enable Location Default Category Default Format + Default Image Width @string/related_posts @string/more Allow Comments @@ -574,6 +578,29 @@ @string/site_settings_privacy_hidden_summary @string/site_settings_privacy_private_summary + + Original Size + 100 + 200 + 300 + 400 + 500 + 600 + 700 + 800 + 900 + 1000 + 1100 + 1200 + 1300 + 1400 + 1500 + 1600 + 1700 + 1800 + 1900 + 2000 + @@ -602,6 +629,29 @@ 0 -1 + + Original Size + 100 + 200 + 300 + 400 + 500 + 600 + 700 + 800 + 900 + 1000 + 1100 + 1200 + 1300 + 1400 + 1500 + 1600 + 1700 + 1800 + 1900 + 2000 + In a few words, explain what this site is about @@ -614,6 +664,7 @@ Automatically add location data to your posts Sets new post category Sets new post format + Resizes images in posts to this width Show or hide related posts in reader View all available Discussion settings View and change your sites discussion settings diff --git a/WordPress/src/main/res/xml/site_settings.xml b/WordPress/src/main/res/xml/site_settings.xml index 05ded3f54bb4..9a63486bb9c1 100644 --- a/WordPress/src/main/res/xml/site_settings.xml +++ b/WordPress/src/main/res/xml/site_settings.xml @@ -89,12 +89,6 @@ android:key="@string/pref_key_site_writing" android:title="@string/site_settings_writing_header"> - - @@ -258,6 +252,27 @@ + + + + + + + + Date: Wed, 6 Jan 2016 15:23:07 -0800 Subject: [PATCH 2/8] Adding upload and link preference to This Device settings --- .../wordpress/android/ui/prefs/SiteSettingsFragment.java | 5 +++++ WordPress/src/main/res/values/strings.xml | 3 +++ WordPress/src/main/res/xml/site_settings.xml | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsFragment.java b/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsFragment.java index e0b695c9720b..3d1a2966f8ca 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsFragment.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsFragment.java @@ -157,6 +157,7 @@ public class SiteSettingsFragment extends PreferenceFragment // This Device settings private DetailListPreference mImageWidthPref; + private WPSwitchPreference mUploadAndLinkPref; // Delete site option (NOTE: only for WP.org) private Preference mDeleteSitePref; @@ -439,6 +440,8 @@ public boolean onPreferenceChange(Preference preference, Object newValue) { setDetailListPreferenceValue(mImageWidthPref, mBlog.getMaxImageWidth(), mBlog.getMaxImageWidth()); + } else if (preference == mUploadAndLinkPref) { + mBlog.setFullSizeImage(Boolean.valueOf(newValue.toString())); } else { return false; } @@ -589,6 +592,7 @@ private void initPreferences() { mModerationHoldPref = getClickPref(R.string.pref_key_site_moderation_hold); mBlacklistPref = getClickPref(R.string.pref_key_site_blacklist); mImageWidthPref = (DetailListPreference) getChangePref(R.string.pref_key_site_image_width); + mUploadAndLinkPref = (WPSwitchPreference) getChangePref(R.string.pref_key_site_upload_and_link_image); mDeleteSitePref = getClickPref(R.string.pref_key_site_delete_site); // .com sites hide the Account category, self-hosted sites hide the Related Posts preference @@ -689,6 +693,7 @@ private void setPreferencesFromSiteSettings() { .getQuantityString(R.plurals.site_settings_multiple_links_summary, mSiteSettings.getMultipleLinks(), mSiteSettings.getMultipleLinks())); + mUploadAndLinkPref.setChecked(mBlog.isFullSizeImage()); mIdentityRequiredPreference.setChecked(mSiteSettings.getIdentityRequired()); mUserAccountRequiredPref.setChecked(mSiteSettings.getUserAccountRequired()); mThreadingPref.setValue(String.valueOf(mSiteSettings.getThreadingLevels())); diff --git a/WordPress/src/main/res/values/strings.xml b/WordPress/src/main/res/values/strings.xml index 99e91d8e3bb3..79225c0d6a4b 100644 --- a/WordPress/src/main/res/values/strings.xml +++ b/WordPress/src/main/res/values/strings.xml @@ -443,6 +443,7 @@ wp_pref_site_default_format wp_pref_site_default_this_device wp_pref_site_default_image_width + wp_pref_site_upload_and_link_image wp_pref_site_discussion wp_pref_site_allow_comments wp_pref_site_allow_comments_nested @@ -507,6 +508,7 @@ Default Category Default Format Default Image Width + @string/upload_full_size_image @string/related_posts @string/more Allow Comments @@ -665,6 +667,7 @@ Sets new post category Sets new post format Resizes images in posts to this width + Enable to always upload the fullsize image Show or hide related posts in reader View all available Discussion settings View and change your sites discussion settings diff --git a/WordPress/src/main/res/xml/site_settings.xml b/WordPress/src/main/res/xml/site_settings.xml index 9a63486bb9c1..8e0d09a29119 100644 --- a/WordPress/src/main/res/xml/site_settings.xml +++ b/WordPress/src/main/res/xml/site_settings.xml @@ -271,6 +271,12 @@ android:entryValues="@array/site_settings_image_width_values" app:longClickHint="@string/site_settings_image_width_hint" /> + + Date: Wed, 6 Jan 2016 15:31:17 -0800 Subject: [PATCH 3/8] Correcting title string --- WordPress/src/main/res/xml/site_settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/src/main/res/xml/site_settings.xml b/WordPress/src/main/res/xml/site_settings.xml index 8e0d09a29119..9af89df83589 100644 --- a/WordPress/src/main/res/xml/site_settings.xml +++ b/WordPress/src/main/res/xml/site_settings.xml @@ -98,7 +98,7 @@ From fe8bdb2d74ae41756292dccf06f9b5a43738c101 Mon Sep 17 00:00:00 2001 From: Tony Rankin Date: Wed, 6 Jan 2016 16:18:47 -0800 Subject: [PATCH 4/8] Order matters when setting up dividers, setting height after drawable --- .../org/wordpress/android/ui/prefs/SiteSettingsFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsFragment.java b/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsFragment.java index 3d1a2966f8ca..8de8e7d6b56d 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsFragment.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsFragment.java @@ -547,9 +547,9 @@ private void setupPreferenceList(ListView prefList, Resources res) { if (prefList == null || res == null) return; // customize list dividers - prefList.setDividerHeight(1); //noinspection deprecation - prefList.setDivider(getResources().getDrawable(R.drawable.preferences_divider)); + prefList.setDivider(res.getDrawable(R.drawable.preferences_divider)); + prefList.setDividerHeight(res.getDimensionPixelSize(R.dimen.site_settings_divider_height)); // handle long clicks on preferences to display hints prefList.setOnItemLongClickListener(this); // required to customize (Calypso) preference views From 0cdd4efe9366efc04b1a676fa82ba7c128323aa7 Mon Sep 17 00:00:00 2001 From: Tony Rankin Date: Wed, 6 Jan 2016 19:19:16 -0800 Subject: [PATCH 5/8] Using WPCheckBox in related post dialog --- .../android/ui/prefs/RelatedPostsDialog.java | 3 --- ...umber_picker_title.xml => calypso_title_text.xml} | 0 .../src/main/res/layout/number_picker_dialog.xml | 4 ++-- .../src/main/res/layout/related_posts_dialog.xml | 12 ++++++------ 4 files changed, 8 insertions(+), 11 deletions(-) rename WordPress/src/main/res/color/{number_picker_title.xml => calypso_title_text.xml} (100%) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/prefs/RelatedPostsDialog.java b/WordPress/src/main/java/org/wordpress/android/ui/prefs/RelatedPostsDialog.java index 6cfb2aaad905..446545bde4b9 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/prefs/RelatedPostsDialog.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/prefs/RelatedPostsDialog.java @@ -76,9 +76,6 @@ public Dialog onCreateDialog(Bundle savedInstanceState) { mPreviewImages.add((ImageView) v.findViewById(R.id.related_post_image2)); mPreviewImages.add((ImageView) v.findViewById(R.id.related_post_image3)); - WPPrefUtils.layoutAsSubhead(mShowHeader); - WPPrefUtils.layoutAsSubhead(mShowImages); - Bundle args = getArguments(); if (args != null) { mShowRelatedPosts.setChecked(args.getBoolean(SHOW_RELATED_POSTS_KEY)); diff --git a/WordPress/src/main/res/color/number_picker_title.xml b/WordPress/src/main/res/color/calypso_title_text.xml similarity index 100% rename from WordPress/src/main/res/color/number_picker_title.xml rename to WordPress/src/main/res/color/calypso_title_text.xml diff --git a/WordPress/src/main/res/layout/number_picker_dialog.xml b/WordPress/src/main/res/layout/number_picker_dialog.xml index 72eb8f9685c7..8c7ce99fcf75 100644 --- a/WordPress/src/main/res/layout/number_picker_dialog.xml +++ b/WordPress/src/main/res/layout/number_picker_dialog.xml @@ -14,7 +14,7 @@ android:layout_marginLeft="24dp" android:layout_marginRight="24dp" android:textSize="@dimen/text_sz_large" - android:textColor="@color/number_picker_title" + android:textColor="@color/calypso_title_text" app:fontFamily="openSans" app:fontVariation="normal" /> @@ -45,7 +45,7 @@ android:layout_marginBottom="8dp" android:duplicateParentState="true" android:textSize="@dimen/text_sz_large" - android:textColor="@color/number_picker_title" + android:textColor="@color/calypso_title_text" app:fontFamily="openSans" app:fontVariation="normal" /> diff --git a/WordPress/src/main/res/layout/related_posts_dialog.xml b/WordPress/src/main/res/layout/related_posts_dialog.xml index bdd5e8e3e8e9..dab3fa2ddf06 100644 --- a/WordPress/src/main/res/layout/related_posts_dialog.xml +++ b/WordPress/src/main/res/layout/related_posts_dialog.xml @@ -42,22 +42,22 @@ app:fontFamily="openSans" app:fontVariation="normal" /> - - Date: Wed, 6 Jan 2016 19:45:37 -0800 Subject: [PATCH 6/8] Removing unnecessary enabled state toggling --- .../ui/prefs/BlogPreferencesActivity.java | 2 -- .../ui/prefs/SiteSettingsFragment.java | 36 +------------------ .../ui/prefs/SiteSettingsInterface.java | 19 +++------- 3 files changed, 5 insertions(+), 52 deletions(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/prefs/BlogPreferencesActivity.java b/WordPress/src/main/java/org/wordpress/android/ui/prefs/BlogPreferencesActivity.java index 7e283a3ad823..46a57ba697a5 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/prefs/BlogPreferencesActivity.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/prefs/BlogPreferencesActivity.java @@ -214,8 +214,6 @@ public void onEventMainThread(ConnectionChangeReceiver.ConnectionChangeEvent eve (SiteSettingsFragment) fragmentManager.findFragmentByTag(KEY_SETTINGS_FRAGMENT); if (siteSettingsFragment != null) { - siteSettingsFragment.allowEditing(event.isConnected()); - if (!event.isConnected()) { ToastUtils.showToast(this, getString(R.string.site_settings_disconnected_toast)); } diff --git a/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsFragment.java b/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsFragment.java index 8de8e7d6b56d..f6306a18bd76 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsFragment.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsFragment.java @@ -182,9 +182,6 @@ public void onCreate(Bundle savedInstanceState) { // setup state to fetch remote settings mShouldFetch = true; - // disable editing until remote data is fetched - allowEditing(false); - // initialize the appropriate settings interface (WP.com or WP.org) mSiteSettings = SiteSettingsInterface.getInterface(activity, mBlog, this); @@ -214,9 +211,9 @@ public void onResume() { public void run() { // initialize settings with locally cached values, fetch remote on first pass mSiteSettings.init(true); - // stop future calls from fetching remote settings } }, FETCH_DELAY); + // stop future calls from fetching remote settings mShouldFetch = false; } } @@ -512,37 +509,6 @@ public void onCredentialsValidated(Exception error) { } } - public void allowEditing(boolean allow) { - // Address won't be editable until the app supports domain name changes - if (mAddressPref != null) mAddressPref.setEnabled(false); - - if (mTitlePref != null) mTitlePref.setEnabled(allow); - if (mTaglinePref != null) mTaglinePref.setEnabled(allow); - if (mPrivacyPref != null) mPrivacyPref.setEnabled(allow); - if (mLanguagePref != null) mLanguagePref.setEnabled(allow); - if (mLocationPref != null) mLocationPref.setEnabled(allow); - if (mCategoryPref != null) mCategoryPref.setEnabled(allow); - if (mFormatPref != null) mFormatPref.setEnabled(allow); - if (mAllowCommentsPref != null) mAllowCommentsPref.setEnabled(allow); - if (mAllowCommentsNested != null) mAllowCommentsNested.setEnabled(allow); - if (mSendPingbacksPref != null) mSendPingbacksPref.setEnabled(allow); - if (mSendPingbacksNested != null) mSendPingbacksNested.setEnabled(allow); - if (mReceivePingbacksPref != null) mReceivePingbacksPref.setEnabled(allow); - if (mReceivePingbacksNested != null) mReceivePingbacksNested.setEnabled(allow); - if (mIdentityRequiredPreference != null) mIdentityRequiredPreference.setEnabled(allow); - if (mUserAccountRequiredPref != null) mUserAccountRequiredPref.setEnabled(allow); - if (mCloseAfterPref != null) mCloseAfterPref.setEnabled(allow); - if (mSortByPref != null) mSortByPref.setEnabled(allow); - if (mThreadingPref != null) mThreadingPref.setEnabled(allow); - if (mPagingPref != null) mPagingPref.setEnabled(allow); - if (mWhitelistPref != null) mWhitelistPref.setEnabled(allow); - if (mMultipleLinksPref != null) mMultipleLinksPref.setEnabled(allow); - if (mModerationHoldPref != null) mModerationHoldPref.setEnabled(allow); - if (mBlacklistPref != null) mBlacklistPref.setEnabled(allow); - if (mRelatedPostsPref != null) mRelatedPostsPref.setEnabled(allow); - if (mDeleteSitePref != null) mDeleteSitePref.setEnabled(allow); - } - private void setupPreferenceList(ListView prefList, Resources res) { if (prefList == null || res == null) return; diff --git a/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsInterface.java b/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsInterface.java index 6d2aa3158696..39c34e9aaf46 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsInterface.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsInterface.java @@ -669,27 +669,16 @@ public SiteSettingsInterface init(boolean fetchRemote) { * If there is a change in verification status the listener is notified. */ protected void credentialsVerified(boolean valid) { - if (valid) { - if (!mSettings.hasVerifiedCredentials) { - notifyCredentialsVerifiedOnUiThread(null); - } - mRemoteSettings.hasVerifiedCredentials = mSettings.hasVerifiedCredentials = true; - } else { - if (mSettings.hasVerifiedCredentials) { - notifyCredentialsVerifiedOnUiThread(new AuthenticationError()); - } - mRemoteSettings.hasVerifiedCredentials = mSettings.hasVerifiedCredentials = false; - } + Exception e = valid ? new AuthenticationError() : null; + if (mSettings.hasVerifiedCredentials != valid) notifyCredentialsVerifiedOnUiThread(e); + mRemoteSettings.hasVerifiedCredentials = mSettings.hasVerifiedCredentials = valid; } /** * Helper method to create an XML-RPC interface for the current blog. */ protected XMLRPCClientInterface instantiateInterface() { - if (mBlog == null) { - return null; - } - + if (mBlog == null) return null; return XMLRPCFactory.instantiate(mBlog.getUri(), mBlog.getHttpuser(), mBlog.getHttppassword()); } From 4670e2ee110dfbec48b4ad4278f73c5195bd191f Mon Sep 17 00:00:00 2001 From: Tony Rankin Date: Wed, 6 Jan 2016 20:50:55 -0800 Subject: [PATCH 7/8] Using existing string and updating some CheckBox views --- WordPress/src/main/res/layout/blog_preferences.xml | 4 ++-- WordPress/src/main/res/values/strings.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/WordPress/src/main/res/layout/blog_preferences.xml b/WordPress/src/main/res/layout/blog_preferences.xml index 47b8ffa5f03b..5a1266a91536 100644 --- a/WordPress/src/main/res/layout/blog_preferences.xml +++ b/WordPress/src/main/res/layout/blog_preferences.xml @@ -93,7 +93,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" /> - - Select categories Tags (separate tags with commas) Content (tap to add text and media) - Default image width + Default Image Width Password Blogs Account details @@ -507,7 +507,7 @@ Enable Location Default Category Default Format - Default Image Width + @string/max_thumbnail_px_width @string/upload_full_size_image @string/related_posts @string/more From 3aefb835e93add31eefc7d9fc3befdb5cd51f69a Mon Sep 17 00:00:00 2001 From: Tony Rankin Date: Wed, 6 Jan 2016 21:10:37 -0800 Subject: [PATCH 8/8] Fixing mis-translated boolean logic --- .../org/wordpress/android/ui/prefs/SiteSettingsInterface.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsInterface.java b/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsInterface.java index 39c34e9aaf46..943779a41924 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsInterface.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsInterface.java @@ -669,7 +669,7 @@ public SiteSettingsInterface init(boolean fetchRemote) { * If there is a change in verification status the listener is notified. */ protected void credentialsVerified(boolean valid) { - Exception e = valid ? new AuthenticationError() : null; + Exception e = valid ? null : new AuthenticationError(); if (mSettings.hasVerifiedCredentials != valid) notifyCredentialsVerifiedOnUiThread(e); mRemoteSettings.hasVerifiedCredentials = mSettings.hasVerifiedCredentials = valid; }