Skip to content

Commit eef691e

Browse files
authored
Merge pull request #17146 from wordpress-mobile/release/20.7
Merge changes from hotfix 20.6.1, 20.7 code freeze, and 20.7-rc.2 into `trunk`
2 parents cdb7eab + f7f1c87 commit eef691e

File tree

49 files changed

+1136
-1244
lines changed

Some content is hidden

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

49 files changed

+1136
-1244
lines changed

WordPress/src/main/java/org/wordpress/android/ui/activitylog/detail/ActivityLogDetailFragment.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ class ActivityLogDetailFragment : Fragment(R.layout.activity_log_item_detail) {
7575

7676
if (jetpackBrandingUtils.shouldShowJetpackBranding()) {
7777
jetpackBadge.root.isVisible = true
78-
jetpackBadge.jetpackPoweredBadge.setOnClickListener {
79-
jetpackBrandingUtils.trackBadgeTapped(ACTIVITY_LOG_DETAIL)
80-
viewModel.showJetpackPoweredBottomSheet()
78+
if (jetpackBrandingUtils.shouldShowJetpackPoweredBottomSheet()) {
79+
jetpackBadge.jetpackPoweredBadge.setOnClickListener {
80+
jetpackBrandingUtils.trackBadgeTapped(ACTIVITY_LOG_DETAIL)
81+
viewModel.showJetpackPoweredBottomSheet()
82+
}
8183
}
8284
}
8385
}

WordPress/src/main/java/org/wordpress/android/ui/main/MeFragment.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,14 @@ class MeFragment : Fragment(R.layout.me_fragment), OnScrollToTopListener {
126126
setTitle(packageManager.getActivityInfo(componentName, PackageManager.GET_META_DATA).labelRes)
127127
}
128128
}
129-
129+
130130
if (jetpackBrandingUtils.shouldShowJetpackBranding()) {
131131
jetpackBadge.isVisible = true
132-
jetpackBadge.setOnClickListener {
133-
jetpackBrandingUtils.trackBadgeTapped(ME)
134-
viewModel.showJetpackPoweredBottomSheet()
132+
if (jetpackBrandingUtils.shouldShowJetpackPoweredBottomSheet()) {
133+
jetpackBadge.setOnClickListener {
134+
jetpackBrandingUtils.trackBadgeTapped(ME)
135+
viewModel.showJetpackPoweredBottomSheet()
136+
}
135137
}
136138
}
137139

WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteCardAndItem.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,6 @@ sealed class MySiteCardAndItem(open val type: Type, open val activeQuickStartIte
277277
}
278278

279279
data class JetpackBadge(
280-
val onClick: ListItemInteraction
280+
val onClick: ListItemInteraction? = null
281281
) : MySiteCardAndItem(JETPACK_BADGE)
282282
}

WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteViewModel.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,11 @@ class MySiteViewModel @Inject constructor(
497497
)
498498

499499
val jetpackBadge = JetpackBadge(
500-
ListItemInteraction.create(this::onJetpackBadgeClick)
500+
if (jetpackBrandingUtils.shouldShowJetpackPoweredBottomSheet()) {
501+
ListItemInteraction.create(this::onJetpackBadgeClick)
502+
} else {
503+
null
504+
}
501505
).takeIf { jetpackBrandingUtils.shouldShowJetpackBranding() }
502506

503507
return mapOf(

WordPress/src/main/java/org/wordpress/android/ui/mysite/jetpackbadge/MySiteJetpackBadgeViewHolder.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class MySiteJetpackBadgeViewHolder(
1010
parent: ViewGroup,
1111
) : MySiteCardAndItemViewHolder<JetpackBadgeBinding>(parent.viewBinding(JetpackBadgeBinding::inflate)) {
1212
fun bind(item: JetpackBadge) = with(binding) {
13-
jetpackPoweredBadge.setOnClickListener { item.onClick.click() }
13+
item.onClick?.run {
14+
jetpackPoweredBadge.setOnClickListener { click() }
15+
}
1416
}
1517
}

WordPress/src/main/java/org/wordpress/android/ui/prefs/AppSettingsFragment.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,14 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
249249
private void addJetpackBadgeAsFooterIfEnabled(LayoutInflater inflater, ListView listView) {
250250
if (mJetpackBrandingUtils.shouldShowJetpackBranding()) {
251251
final JetpackBadgeFooterBinding binding = JetpackBadgeFooterBinding.inflate(inflater);
252-
binding.footerJetpackBadge.jetpackPoweredBadge.setOnClickListener(v -> {
252+
if (mJetpackBrandingUtils.shouldShowJetpackPoweredBottomSheet()) {
253+
binding.footerJetpackBadge.jetpackPoweredBadge.setOnClickListener(v -> {
253254
mJetpackBrandingUtils.trackBadgeTapped(Screen.APP_SETTINGS);
254255
new JetpackPoweredBottomSheetFragment().show(
255256
((AppCompatActivity) getActivity()).getSupportFragmentManager(),
256257
JetpackPoweredBottomSheetFragment.TAG);
257-
});
258+
});
259+
}
258260
listView.addFooterView(binding.getRoot(), null, false);
259261
}
260262
}

WordPress/src/main/java/org/wordpress/android/ui/prefs/notifications/NotificationsSettingsFragment.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,14 @@ private void addJetpackBadgeAsFooterIfEnabled(ListView listView) {
229229
if (mJetpackBrandingUtils.shouldShowJetpackBranding()) {
230230
LayoutInflater inflater = LayoutInflater.from(getContext());
231231
final JetpackBadgeFooterBinding binding = JetpackBadgeFooterBinding.inflate(inflater);
232-
binding.footerJetpackBadge.jetpackPoweredBadge.setOnClickListener(v -> {
233-
mJetpackBrandingUtils.trackBadgeTapped(Screen.NOTIFICATIONS_SETTINGS);
234-
new JetpackPoweredBottomSheetFragment().show(
235-
((AppCompatActivity) getActivity()).getSupportFragmentManager(),
236-
JetpackPoweredBottomSheetFragment.TAG);
237-
});
232+
if (mJetpackBrandingUtils.shouldShowJetpackPoweredBottomSheet()) {
233+
binding.footerJetpackBadge.jetpackPoweredBadge.setOnClickListener(v -> {
234+
mJetpackBrandingUtils.trackBadgeTapped(Screen.NOTIFICATIONS_SETTINGS);
235+
new JetpackPoweredBottomSheetFragment().show(
236+
((AppCompatActivity) getActivity()).getSupportFragmentManager(),
237+
JetpackPoweredBottomSheetFragment.TAG);
238+
});
239+
}
238240
listView.addFooterView(binding.getRoot(), null, false);
239241
}
240242
}

WordPress/src/main/java/org/wordpress/android/ui/reader/ReaderPostDetailFragment.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -715,9 +715,11 @@ class ReaderPostDetailFragment : ViewPagerFragment(),
715715

716716
if (jetpackBrandingUtils.shouldShowJetpackBranding()) {
717717
binding.jetpackBadge.root.isVisible = true
718-
binding.jetpackBadge.jetpackPoweredBadge.setOnClickListener {
719-
jetpackBrandingUtils.trackBadgeTapped(READER_POST_DETAIL)
720-
viewModel.showJetpackPoweredBottomSheet()
718+
if (jetpackBrandingUtils.shouldShowJetpackPoweredBottomSheet()) {
719+
binding.jetpackBadge.jetpackPoweredBadge.setOnClickListener {
720+
jetpackBrandingUtils.trackBadgeTapped(READER_POST_DETAIL)
721+
viewModel.showJetpackPoweredBottomSheet()
722+
}
721723
}
722724
}
723725

WordPress/src/main/java/org/wordpress/android/util/config/JetpackPoweredBottomSheetFeatureConfig.kt

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
package org.wordpress.android.util.config
22

33
import org.wordpress.android.BuildConfig
4-
import org.wordpress.android.annotation.FeatureInDevelopment
4+
import org.wordpress.android.annotation.Feature
55
import javax.inject.Inject
66

7-
/**
8-
* Configuration for Jetpack Powered Bottom Sheet
9-
*
10-
* TODO: When it is ready to be rolled out uncomment the lines 12 and 19, remove line 13 and this to-do
11-
*/
12-
// @Feature(JetpackPoweredBottomSheetFeatureConfig.JETPACK_POWERED_BOTTOM_SHEET_REMOTE_FIELD, true)
13-
@FeatureInDevelopment
14-
@Suppress("ForbiddenComment")
7+
@Feature(JetpackPoweredBottomSheetFeatureConfig.JETPACK_POWERED_BOTTOM_SHEET_REMOTE_FIELD, false)
158
class JetpackPoweredBottomSheetFeatureConfig @Inject constructor(
169
appConfig: AppConfig
1710
) : FeatureConfig(
1811
appConfig,
19-
BuildConfig.JETPACK_POWERED,
20-
// JETPACK_POWERED_BOTTOM_SHEET_REMOTE_FIELD
12+
BuildConfig.JETPACK_POWERED_BOTTOM_SHEET,
13+
JETPACK_POWERED_BOTTOM_SHEET_REMOTE_FIELD
2114
) {
2215
companion object {
2316
const val JETPACK_POWERED_BOTTOM_SHEET_REMOTE_FIELD = "jetpack_powered_bottom_sheet_remote_field"

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ Language: ar
5959
<string name="stats_insights_comments_guide_card">💡اضغط على \"عرض المزيد\" للاطلاع على أفضل المعلقين لديك.</string>
6060
<string name="stats_insights_views_and_visitors_visitors_empty_state">مراجعة أفضل نصائحنا لزيادة مشاهداتك وحركة مرورك ⁦%1$s⁩</string>
6161
<string name="stats_action_card_schedule_post_message">✍️ قم بجدولة مسوداتك لنشرها في أفضل وقت للوصول إلى جمهورك.</string>
62-
<string name="stats_view_publicize">اتصالات شبكات التواصل الاجتماعي</string>
6362
<string name="stats_insights_latest_post_empty">تحقَّق من هذا مرة أخرى عندما تكون قد نشرت تدوينتك الأولى!</string>
6463
<string name="stats_action_card_blogging_reminders_message">💡يُعد التدوين باستمرار طريقة رائعة لبناء جمهورك. أضف تذكيرًا يبقيك في المسار الصحيح.</string>
6564
<string name="stats_action_card_grow_audience_message">💡ارتق بمستوى تدوينك بشكل أسرع بفضل دورة &lt;i&gt;مقدمة إلى التدوين&lt;/i&gt; التدريبية الخاصة بنا التي يقودها الخبراء.</string>
@@ -1332,7 +1331,6 @@ Language: ar
13321331
<string name="gutenberg_native_add_paragraph_block">إضافة مكوّن فقرة</string>
13331332
<string name="gutenberg_native_border_radius">زوايا الحدود</string>
13341333
<string name="dialog_title_sharing_facebook_account_must_have_pages">غير متصل</string>
1335-
<string name="sharing_facebook_account_must_have_pages">يتعذر الاتصال بـ Facebook العثور على أي صفحات. لا يمكن لآلية النشر الاتصال بملفات تعريف Facebook الشخصية، فقط للصفحات المنشورة.</string>
13361334
<string name="post_list_tab_published_posts">منشور</string>
13371335
<string name="post_list_tab_scheduled_posts">مجدول</string>
13381336
<string name="post_list_tab_trashed_posts">محذوف</string>
@@ -2560,10 +2558,8 @@ Language: ar
25602558
<string name="share_btn_disconnect">قطع الاتصال</string>
25612559
<string name="share_btn_connect">اتصال</string>
25622560
<string name="connection_service_description">اتصل لمشاركة مقالات مدونتك تلقائيًا على %s.</string>
2563-
<string name="connection_service_label">الإشهار على %s</string>
25642561
<string name="connected_accounts_label">الحسابات المتصلة</string>
25652562
<string name="connections_description">قم بتوصيل خدمات التواصل الاجتماعي المفضلة لديك لمشاركة المقالات الجديدة تلقائيًا مع الأصدقاء.</string>
2566-
<string name="connections_label">اتصالات</string>
25672563
<string name="sharing">مشاركة</string>
25682564
<string name="tabbar_accessibility_label_notifications">تنبيهات. قم بإدارة تنبيهاتك.</string>
25692565
<string name="tabbar_accessibility_label_reader">القارئ. متابعة محتوى من مواقع أخرى.</string>

0 commit comments

Comments
 (0)