Dan Ballard pushed to branch tor-browser-153.0esr-16.0-1 at The Tor Project / Applications / Tor Browser

Commits:

3 changed files:

Changes:

  • mobile/android/android-components/components/compose/browser-toolbar/src/main/java/mozilla/components/compose/browser/toolbar/ActionContainer.kt
    ... ... @@ -37,6 +37,8 @@ import mozilla.components.compose.browser.toolbar.ui.TabCounter
    37 37
     import mozilla.components.compose.browser.toolbar.ui.ActionButton as ActionButtonComposable
    
    38 38
     import mozilla.components.ui.icons.R as iconsR
    
    39 39
     
    
    40
    +import mozilla.components.compose.browser.toolbar.concept.NoopAction
    
    41
    +
    
    40 42
     /**
    
    41 43
      * A container for displaying [Action]s.
    
    42 44
      *
    
    ... ... @@ -122,6 +124,8 @@ fun ActionContainer(
    122 124
                             )
    
    123 125
                         }
    
    124 126
                     }
    
    127
    +
    
    128
    +                else -> NoopAction()
    
    125 129
                 }
    
    126 130
             }
    
    127 131
         }
    

  • mobile/android/android-components/components/compose/browser-toolbar/src/main/java/mozilla/components/compose/browser/toolbar/concept/Action.kt
    ... ... @@ -189,3 +189,5 @@ sealed class Action {
    189 189
             val onClick: BrowserToolbarInteraction,
    
    190 190
         ) : Action()
    
    191 191
     }
    
    192
    +
    
    193
    +class NoopAction : Action()

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/toolbar/BrowserToolbarMiddleware.kt
    ... ... @@ -143,6 +143,8 @@ import mozilla.components.lib.state.Action as MVIAction
    143 143
     import mozilla.components.ui.icons.R as iconsR
    
    144 144
     import mozilla.components.ui.tabcounter.R as tabcounterR
    
    145 145
     
    
    146
    +import mozilla.components.compose.browser.toolbar.concept.NoopAction
    
    147
    +
    
    146 148
     @VisibleForTesting
    
    147 149
     internal sealed class DisplayActions(override val source: Source) : BrowserToolbarEvent {
    
    148 150
         data class MenuClicked(override val source: Source) : DisplayActions(source)
    
    ... ... @@ -1318,17 +1320,13 @@ class BrowserToolbarMiddleware(
    1318 1320
                 )
    
    1319 1321
             }
    
    1320 1322
     
    
    1321
    -        ToolbarAction.Share -> ActionButtonRes(
    
    1322
    -            drawableResId = iconsR.drawable.mozac_ic_share_android_24,
    
    1323
    -            contentDescription = R.string.browser_menu_share,
    
    1324
    -            onClick = ShareClicked(source),
    
    1325
    -        )
    
    1326
    -
    
    1327 1323
             ToolbarAction.Homepage -> ActionButtonRes(
    
    1328 1324
                 drawableResId = iconsR.drawable.mozac_ic_home_24,
    
    1329 1325
                 contentDescription = R.string.browser_menu_homepage,
    
    1330 1326
                 onClick = HomepageClicked(source),
    
    1331 1327
             )
    
    1328
    +
    
    1329
    +        else -> NoopAction()
    
    1332 1330
         }
    
    1333 1331
     
    
    1334 1332
         private fun buildSiteInfoAction(