Skip to content

Commit 4c19e4d

Browse files
authored
Merge pull request #17193 from wordpress-mobile/release/20.8
Merge release branch after 20.8-rc-2 beta
2 parents be4a896 + 6f4327d commit 4c19e4d

File tree

56 files changed

+1422
-1391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1422
-1391
lines changed

WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostPublishSettingsViewModel.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ class EditPostPublishSettingsViewModel @Inject constructor(
4343

4444
postRepository?.let {
4545
val site = siteStore.getSiteByLocalId(it.localSiteId) ?: return@let
46-
fetchAuthors(site)
46+
if (site.hasCapabilityListUsers) {
47+
fetchAuthors(site)
48+
}
4749
}
4850
}
4951

WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostSettingsFragment.java

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ public class EditPostSettingsFragment extends Fragment {
111111
private TextView mStatusTextView;
112112
private TextView mPostFormatTextView;
113113
private TextView mPasswordTextView;
114+
private View mPostAuthorDivider;
115+
private LinearLayout mPostAuthorContainer;
114116
private TextView mAuthorTextView;
115117
private TextView mPublishDateTextView;
116118
private TextView mPublishDateTitleTextView;
@@ -261,6 +263,8 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
261263
mStatusTextView = rootView.findViewById(R.id.post_status);
262264
mPostFormatTextView = rootView.findViewById(R.id.post_format);
263265
mPasswordTextView = rootView.findViewById(R.id.post_password);
266+
mPostAuthorDivider = rootView.findViewById(R.id.post_author_divider);
267+
mPostAuthorContainer = rootView.findViewById(R.id.post_author_container);
264268
mAuthorTextView = rootView.findViewById(R.id.post_author);
265269
mPublishDateTextView = rootView.findViewById(R.id.publish_date);
266270
mPublishDateTitleTextView = rootView.findViewById(R.id.publish_date_title);
@@ -367,8 +371,7 @@ public void onClick(View view) {
367371
}
368372
});
369373

370-
final LinearLayout authorContainer = rootView.findViewById(R.id.post_author_container);
371-
authorContainer.setOnClickListener(view -> showAuthorDialog());
374+
mPostAuthorContainer.setOnClickListener(view -> showAuthorDialog());
372375

373376
mStickySwitch.setOnCheckedChangeListener(mOnStickySwitchChangeListener);
374377

@@ -948,19 +951,24 @@ private void updatePublishDateTextView(String label, PostImmutableModel postImmu
948951
}
949952

950953
private void updateAuthorTextView(String authorDisplayName) {
951-
if (authorDisplayName == null) {
952-
// If the authorDisplayName is null, that means this is a new unpublished post.
953-
// Set author to the current user name.
954-
EditPostRepository editPostRepository = getEditPostRepository();
955-
if (editPostRepository == null) {
956-
return;
957-
}
958-
PostImmutableModel postModel = editPostRepository.getPost();
959-
if (postModel != null && postModel.getAuthorDisplayName() == null) {
960-
updateAuthorTextView(mAccountStore.getAccount().getDisplayName());
954+
if (getSite() != null && getSite().getHasCapabilityListUsers()) {
955+
mPostAuthorDivider.setVisibility(View.VISIBLE);
956+
mPostAuthorContainer.setVisibility(View.VISIBLE);
957+
958+
if (authorDisplayName == null) {
959+
// If the authorDisplayName is null, that means this is a new unpublished post.
960+
// Set author to the current user name.
961+
EditPostRepository editPostRepository = getEditPostRepository();
962+
if (editPostRepository == null) {
963+
return;
964+
}
965+
PostImmutableModel postModel = editPostRepository.getPost();
966+
if (postModel != null && postModel.getAuthorDisplayName() == null) {
967+
updateAuthorTextView(mAccountStore.getAccount().getDisplayName());
968+
}
969+
} else {
970+
mAuthorTextView.setText(authorDisplayName);
961971
}
962-
} else {
963-
mAuthorTextView.setText(authorDisplayName);
964972
}
965973
}
966974

WordPress/src/main/res/layout/edit_post_settings_fragment.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
34
android:id="@+id/settings_fragment_root"
45
android:theme="@style/PostSettingsTheme"
56
android:layout_width="match_parent"
@@ -65,11 +66,17 @@
6566
android:hint="@string/post_settings_not_set" />
6667
</LinearLayout>
6768

68-
<View style="@style/PostSettingsDivider" />
69+
<View
70+
android:id="@+id/post_author_divider"
71+
style="@style/PostSettingsDivider"
72+
android:visibility="gone"
73+
tools:visibility="visible" />
6974

7075
<LinearLayout
7176
android:id="@+id/post_author_container"
72-
style="@style/PostSettingsContainer" >
77+
style="@style/PostSettingsContainer"
78+
android:visibility="gone"
79+
tools:visibility="visible" >
7380

7481
<com.google.android.material.textview.MaterialTextView
7582
style="@style/PostSettingsTitle"

WordPress/src/main/res/values-ar/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!--
33
Translation-Revision-Date: 2022-09-13 10:54:08+0000
44
Plural-Forms: nplurals=6; plural=(n == 0) ? 0 : ((n == 1) ? 1 : ((n == 2) ? 2 : ((n % 100 >= 3 && n % 100 <= 10) ? 3 : ((n % 100 >= 11 && n % 100 <= 99) ? 4 : 5))));
5-
Generator: GlotPress/4.0.0-alpha.2
5+
Generator: GlotPress/4.0.0-alpha.3
66
Language: ar
77
-->
88
<resources>

WordPress/src/main/res/values-az/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!--
33
Translation-Revision-Date: 2015-12-08 01:00:08+0000
44
Plural-Forms: nplurals=2; plural=n != 1;
5-
Generator: GlotPress/4.0.0-alpha.2
5+
Generator: GlotPress/4.0.0-alpha.3
66
Language: az
77
-->
88
<resources>

WordPress/src/main/res/values-bg/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!--
33
Translation-Revision-Date: 2018-12-10 19:56:03+0000
44
Plural-Forms: nplurals=2; plural=n != 1;
5-
Generator: GlotPress/4.0.0-alpha.2
5+
Generator: GlotPress/4.0.0-alpha.3
66
Language: bg
77
-->
88
<resources>

WordPress/src/main/res/values-cs/strings.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
Translation-Revision-Date: 2022-08-31 08:15:33+0000
3+
Translation-Revision-Date: 2022-09-16 15:59:20+0000
44
Plural-Forms: nplurals=3; plural=(n == 1) ? 0 : ((n >= 2 && n <= 4) ? 1 : 2);
5-
Generator: GlotPress/4.0.0-alpha.2
5+
Generator: GlotPress/4.0.0-alpha.3
66
Language: cs_CZ
77
-->
88
<resources>
@@ -1127,6 +1127,7 @@ Language: cs_CZ
11271127
<string name="error_failed_to_load_into_file">Načtení do souboru se nezdařilo, zkuste to znovu.</string>
11281128
<string name="crop">oříznutí</string>
11291129
<string name="insert_label_with_count">Vložit %d</string>
1130+
<string name="feature_announcement_dialog_label">Co je nového na %s</string>
11301131
<string name="feature_announcement_find_out_mode">Zjistit více</string>
11311132
<string name="sitepicker_continue_flow">Pokračovat</string>
11321133
<string name="whats_new_in_version_title">Co je nového</string>
@@ -1218,6 +1219,7 @@ Language: cs_CZ
12181219
<string name="post_list_tab_scheduled_posts">Naplánováno</string>
12191220
<string name="post_list_tab_published_posts">Publikováno</string>
12201221
<string name="dialog_title_sharing_facebook_account_must_have_pages">Nepřipojeno</string>
1222+
<string name="sharing_facebook_account_must_have_pages">Připojení k Facebooku nemůže najít žádné stránky. Publicita se nemůže připojit k profilům Facebooku, pouze k publikovaným stránkám.</string>
12211223
<string name="notifications_tab_title_comments">Komentáře</string>
12221224
<string name="notifications_tab_title_unread_notifications">Nepřečteno</string>
12231225
<string name="dlg_cancel_action_dont_trash">Ponechat</string>

WordPress/src/main/res/values-cy/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!--
33
Translation-Revision-Date: 2017-03-25 17:35:05+0000
44
Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3;
5-
Generator: GlotPress/4.0.0-alpha.2
5+
Generator: GlotPress/4.0.0-alpha.3
66
Language: cy_GB
77
-->
88
<resources>

WordPress/src/main/res/values-da/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!--
33
Translation-Revision-Date: 2021-08-01 11:11:29+0000
44
Plural-Forms: nplurals=2; plural=n != 1;
5-
Generator: GlotPress/4.0.0-alpha.2
5+
Generator: GlotPress/4.0.0-alpha.3
66
Language: da_DK
77
-->
88
<resources>

WordPress/src/main/res/values-de/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!--
33
Translation-Revision-Date: 2022-09-08 09:34:53+0000
44
Plural-Forms: nplurals=2; plural=n != 1;
5-
Generator: GlotPress/4.0.0-alpha.2
5+
Generator: GlotPress/4.0.0-alpha.3
66
Language: de
77
-->
88
<resources>

0 commit comments

Comments
 (0)