mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Backed out changeset b7b5591bbe22 (bug 1890369) for causing fenix failures in HomeFragmentTest CLOSED TREE
This commit is contained in:
parent
724ac2384d
commit
a66d4b8629
@ -657,7 +657,6 @@ class HomeFragment : Fragment() {
|
||||
)
|
||||
},
|
||||
operation = { },
|
||||
anchorView = snackbarAnchorView,
|
||||
elevation = TOAST_ELEVATION,
|
||||
paddedForBottomToolbar = true,
|
||||
)
|
||||
|
@ -31,6 +31,7 @@ import org.mozilla.fenix.GleanMetrics.Pings
|
||||
import org.mozilla.fenix.GleanMetrics.TopSites
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.components.AppStore
|
||||
import org.mozilla.fenix.components.FenixSnackbar
|
||||
import org.mozilla.fenix.databinding.TopSiteItemBinding
|
||||
import org.mozilla.fenix.ext.bitmapForUrl
|
||||
import org.mozilla.fenix.ext.components
|
||||
@ -67,6 +68,19 @@ class TopSiteItemViewHolder(
|
||||
)
|
||||
is TopSiteItemMenu.Item.RemoveTopSite -> {
|
||||
interactor.onRemoveTopSiteClicked(topSite)
|
||||
FenixSnackbar.make(
|
||||
view = it,
|
||||
duration = FenixSnackbar.LENGTH_LONG,
|
||||
isDisplayedWithBrowserToolbar = false,
|
||||
)
|
||||
.setText(it.context.getString(R.string.snackbar_top_site_removed))
|
||||
.setAction(it.context.getString(R.string.snackbar_deleted_undo)) {
|
||||
it.context.components.useCases.topSitesUseCase.addPinnedSites(
|
||||
topSite.title.toString(),
|
||||
topSite.url,
|
||||
)
|
||||
}
|
||||
.show()
|
||||
}
|
||||
is TopSiteItemMenu.Item.Settings -> interactor.onSettingsClicked()
|
||||
is TopSiteItemMenu.Item.SponsorPrivacy -> interactor.onSponsorPrivacyClicked()
|
||||
|
Loading…
Reference in New Issue
Block a user