From 36188300010974fdd7c8bb682690ff6a72d9b2f0 Mon Sep 17 00:00:00 2001 From: Abhijit Valluri Date: Sun, 13 Sep 2020 20:13:07 +0100 Subject: [PATCH] Properly incorporate upstream fixes in tabs tray component --- .../java/org/mozilla/fenix/tabtray/TabTrayView.kt | 11 +++-------- app/src/main/res/drawable/ic_new.xml | 2 +- .../main/res/layout/component_tabs_screen_bottom.xml | 1 + app/src/main/res/layout/component_tabs_screen_top.xml | 1 + app/src/main/res/layout/component_tabstray_top.xml | 1 + 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayView.kt b/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayView.kt index ef1ef8a98..6fe097bb9 100644 --- a/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayView.kt +++ b/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayView.kt @@ -262,14 +262,9 @@ class TabTrayView( concatAdapter.addAdapter(syncedTabsController.adapter) } - // Disabling the following block of code because it causes a crash when - // accessibility services are enabled! `notifyDataSetChanged()` is incompatible - // with concatAdapter. See: https://github.com/mozilla-mobile/fenix/issues/14540 - // WARNING: Merging the upstream fix for this will cause lot of conflicts! - // - // if (hasAccessibilityEnabled) { - // tabsAdapter.notifyItemRangeChanged(0, tabs.size) - // } + if (hasAccessibilityEnabled) { + tabsAdapter.notifyItemRangeChanged(0, tabs.size) + } if (!hasLoaded) { hasLoaded = true diff --git a/app/src/main/res/drawable/ic_new.xml b/app/src/main/res/drawable/ic_new.xml index 57a1dbcd9..52f76c04b 100644 --- a/app/src/main/res/drawable/ic_new.xml +++ b/app/src/main/res/drawable/ic_new.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" android:viewportHeight="24"> diff --git a/app/src/main/res/layout/component_tabs_screen_bottom.xml b/app/src/main/res/layout/component_tabs_screen_bottom.xml index 7c6234118..882a2d425 100644 --- a/app/src/main/res/layout/component_tabs_screen_bottom.xml +++ b/app/src/main/res/layout/component_tabs_screen_bottom.xml @@ -151,6 +151,7 @@ app:layout_constraintBottom_toBottomOf="@id/tab_layout" app:layout_constraintEnd_toStartOf="@id/tab_tray_overflow" app:layout_constraintTop_toTopOf="@id/tab_layout" + app:tint="@color/primary_text_normal_theme" app:srcCompat="@drawable/ic_new" />