Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into bug1878365
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Feb 8, 2024
2 parents eebdaff + 7a6a794 commit b348224
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ class AddonsManagerAdapter(
}

@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
@Suppress("LongMethod")
internal fun bindAddon(
holder: AddonViewHolder,
addon: Addon,
Expand Down Expand Up @@ -291,6 +292,10 @@ class AddonsManagerAdapter(
}

holder.addButton.isInvisible = addon.isInstalled()
holder.addButton.contentDescription = context.getString(
R.string.mozac_feature_addons_install_addon_content_description_2,
addonName,
)
holder.addButton.setOnClickListener {
if (!addon.isInstalled()) {
addonsManagerDelegate.onInstallAddonButtonClicked(addon)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/mozac_feature_addons_install_addon_content_description"
app:srcCompat="@drawable/mozac_ic_plus_24"
app:tint="?android:attr/textColorPrimary" />
</RelativeLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@
<!-- This is a button to cancel the add-on installation . -->
<string name="mozac_feature_addons_permissions_dialog_cancel">Cancel</string>
<!-- Accessibility content description to install add-on button. -->
<string name="mozac_feature_addons_install_addon_content_description">Install Add-on</string>
<string name="mozac_feature_addons_install_addon_content_description" tools:ignore="UnusedResources" moz:removedIn="124">Install Add-on</string>
<!-- Accessibility content description to install add-on button. %1$s is the add-on name. -->
<string name="mozac_feature_addons_install_addon_content_description_2">Install %1$s</string>
<!-- This is the label of a button to cancel an ongoing add-on installation. -->
<string name="mozac_feature_addons_install_addon_dialog_cancel">Cancel</string>
<!-- Indicates how many users have rated an add-on. %1$s will be replaced with number of reviews -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class SettingsSubMenuAddonsManagerRobot {
private fun installButtonForAddon(addonName: String) =
onView(
allOf(
withContentDescription(R.string.mozac_feature_addons_install_addon_content_description),
withContentDescription("Install $addonName"),
isDescendantOfA(withId(R.id.add_on_item)),
hasSibling(hasDescendant(withText(addonName))),
),
Expand Down

0 comments on commit b348224

Please sign in to comment.