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

Commit

Permalink
Bug 1877526 - Add Share and Reload icons on toolbar in the right order
Browse files Browse the repository at this point in the history
  • Loading branch information
sarah541 committed Mar 19, 2024
1 parent 925a172 commit 23c3f6d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@ class ActionButtonTest {
@Test
fun `constructor with drawables`() {
val visibilityListener = { false }
val button = Toolbar.ActionButton(mock(), "image", visibilityListener, { false }, 0, null) { }
val button = Toolbar.ActionButton(
mock(),
"image",
visibilityListener,
{ false },
{ -1 },
0,
null,
) { }
assertNotNull(button.imageDrawable)
assertEquals("image", button.contentDescription)
assertEquals(visibilityListener, button.visible)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ class BrowserFragment : BaseBrowserFragment(), UserInteractionHandler {
R.drawable.mozac_ic_share_android_24,
)!!,
contentDescription = getString(R.string.browser_menu_share),
weight = { 4 },
iconTintColorResource = ThemeManager.resolveAttribute(R.attr.textPrimary, context),
listener = { browserToolbarInteractor.onShareActionClicked() },
)
Expand Down Expand Up @@ -394,6 +395,7 @@ class BrowserFragment : BaseBrowserFragment(), UserInteractionHandler {
)!!,
secondaryContentDescription = context.getString(R.string.browser_menu_stop),
disableInSecondaryState = false,
weight = { 5 },
longClickListener = {
browserToolbarInteractor.onBrowserToolbarMenuItemTapped(
ToolbarMenu.Item.Reload(bypassCache = true),
Expand Down

0 comments on commit 23c3f6d

Please sign in to comment.