For #15007 - Puts swipe to delete behind a feature flag (#15009)

pull/122/head^2
Jeff Boek 4 years ago committed by GitHub
parent 0a8b9e378c
commit c632b6b0a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -40,4 +40,9 @@ object FeatureFlags {
* Enables downloads with external download managers. * Enables downloads with external download managers.
*/ */
const val externalDownloadManager = true const val externalDownloadManager = true
/**
* Enables swipe to delete in bookmarks
*/
val bookmarkSwipeToDelete = Config.channel.isNightlyOrDebug
} }

@ -13,6 +13,7 @@ import kotlinx.android.synthetic.main.component_bookmark.view.*
import mozilla.appservices.places.BookmarkRoot import mozilla.appservices.places.BookmarkRoot
import mozilla.components.concept.storage.BookmarkNode import mozilla.components.concept.storage.BookmarkNode
import mozilla.components.support.base.feature.UserInteractionHandler import mozilla.components.support.base.feature.UserInteractionHandler
import org.mozilla.fenix.FeatureFlags
import org.mozilla.fenix.NavGraphDirections import org.mozilla.fenix.NavGraphDirections
import org.mozilla.fenix.R import org.mozilla.fenix.R
import org.mozilla.fenix.library.LibraryPageView import org.mozilla.fenix.library.LibraryPageView
@ -135,8 +136,10 @@ class BookmarkView(
interactor.onRequestSync() interactor.onRequestSync()
} }
if (FeatureFlags.bookmarkSwipeToDelete) {
BookmarkTouchHelper(interactor).attachToRecyclerView(view.bookmark_list) BookmarkTouchHelper(interactor).attachToRecyclerView(view.bookmark_list)
} }
}
fun update(state: BookmarkFragmentState) { fun update(state: BookmarkFragmentState) {
tree = state.tree tree = state.tree

Loading…
Cancel
Save