Commit 87237b2d authored by clairehurst's avatar clairehurst 🌱 Committed by Pier Angelo Vendrame
Browse files

fixup! [android] Disable features and functionality

Bug 45098: Remove share link button
parent afc494a7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -37,6 +37,8 @@ import mozilla.components.compose.browser.toolbar.ui.TabCounter
import mozilla.components.compose.browser.toolbar.ui.ActionButton as ActionButtonComposable
import mozilla.components.ui.icons.R as iconsR

import mozilla.components.compose.browser.toolbar.concept.NoopAction

/**
 * A container for displaying [Action]s.
 *
@@ -125,6 +127,8 @@ fun ActionContainer(
                        )
                    }
                }

                else -> NoopAction()
            }
        }
    }
+2 −0
Original line number Diff line number Diff line
@@ -195,3 +195,5 @@ sealed class Action {
        val testTag: String? = null,
    ) : Action()
}

class NoopAction : Action()
+4 −6
Original line number Diff line number Diff line
@@ -152,6 +152,8 @@ import mozilla.components.lib.state.Action as MVIAction
import mozilla.components.ui.icons.R as iconsR
import mozilla.components.ui.tabcounter.R as tabcounterR

import mozilla.components.compose.browser.toolbar.concept.NoopAction

@VisibleForTesting
internal sealed class DisplayActions(override val source: Source) : BrowserToolbarEvent {
    data class MenuClicked(override val source: Source) : DisplayActions(source)
@@ -1333,12 +1335,6 @@ class BrowserToolbarMiddleware(
            )
        }

        ToolbarAction.Share -> ActionButtonRes(
            drawableResId = iconsR.drawable.mozac_ic_share_android_24,
            contentDescription = R.string.browser_menu_share,
            onClick = ShareClicked(source),
        )

        ToolbarAction.Homepage -> ActionButtonRes(
            drawableResId = iconsR.drawable.mozac_ic_home_24,
            contentDescription = R.string.browser_menu_homepage,
@@ -1354,6 +1350,8 @@ class BrowserToolbarMiddleware(
            },
            onClick = SummarizeClicked(source),
        )

        else -> NoopAction()
    }

    private fun buildSiteInfoAction(